new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Result.js","sourceRoot":"","sources":["../src/Result.ts"],"names":[],"mappings":";;;;;AAEA,sDAAyB;AAEzB,yBAAyB;AACzB;IAgBE,gBAAoB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;QADhC,gBAAW,GAAU,EAAE,CAAC;IACY,CAAC;IAf7C,sBAAY,gCAAY;aAAxB;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,IAAI,IAAI,CAAC,kBAAkB,CAAA;QAC7H,CAAC;;;OAAA;IAED,sBAAY,sCAAkB;aAA9B;YACE,IAAI,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE;gBAC1C,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;aAC3H;YACD,OAAO,IAAI,CAAC,mBAAmB,CAAC;QAClC,CAAC;;;OAAA;IACD,sBAAY,+BAAW;aAAvB;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC;YACnF,6CAA6C;QAC/C,CAAC;;;OAAA;IAGD,8BAAa,GAAb,UAAc,WAAgC;QAA9C,iBA8BC;QA7BC,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,gBAAgB,CAAC;QAC9D,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,gBAAgB,KAAK,OAAO,EAAE;YACrF,IAAI,QAAQ,KAAK,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CAAC;SACN;KAEF;AACH,CAAC;AAED,0BACE,KAA0B,EAC1B,IAAiE,EACjE,IAAe,EACf,MAAc,EACd,kBAA2B,EAC3B,EAAkB,EAClB,GAAsB;IAEtB,IAAI,kBAAkB,EAAE;QACtB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;KAC3B;IACD,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;AACjE,CAAC;AACD,wBAAwB,IAAe,EAAE,GAAsB;IAC7D,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;QACvD,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,gBAAgB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,QAAG,CAAC,CAAC,CAAC,QAAG,CAAC,EAAE,MAAM,CAAC,CAAC;KAC5F;SAAM;QACL,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAChB;AACH,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
{
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
require('./shim')();
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"is-arguments","version":"1.1.1","files":{".editorconfig":{"checkedAt":1678883671533,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintignore":{"checkedAt":1678883671537,"integrity":"sha512-VLhEcqup3IHXtZJPt07ZYoA9JNRjy1jhU/NU41Yw4E8mEyea/z+6bw5hL3lhCO09pji9E0BH2Q3aDXdc3i9zBg==","mode":420,"size":10},".nycrc":{"checkedAt":1678883669555,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1678883671697,"integrity":"sha512-VAafw6n4N41XvAsR+n+iEdr0zTIENa8hymUUtLGRZtNAEzrKNuwlPdG/4XVTK8bgjhOLpy2sORJp/QqopRK+Yg==","mode":420,"size":1081},".eslintrc":{"checkedAt":1678883671909,"integrity":"sha512-ZqYMrc7ZCuFy1HVR4Fxafb3Li0GBXxfJf0zwL4bIwQiZqNiBXz3nLVubRC7knfWKchXSo2jcfmud8AAT4+oegw==","mode":420,"size":141},"index.js":{"checkedAt":1678883671909,"integrity":"sha512-dihnpZlfKUYoBhPcdZi+k3lgYr2r+vYfks80rRQQkMM58P0s+gFLqVDwKQRVly+TmxVMTDyrc7AmKXgZIMGCQA==","mode":420,"size":976},"test/index.js":{"checkedAt":1678883671909,"integrity":"sha512-gyjRf4wT/eORsr2X3lplFMbW0TIO+tawAVHDUzVOvrZCmeK7R5hhY9j10Q1Lay8f77I8rW0+6PwSHUTPwAJjZA==","mode":420,"size":1377},"package.json":{"checkedAt":1678883671909,"integrity":"sha512-qUX7YRC3opoZO5BV/W5CnxQiw5CPHFruwT4Y24iaTyPDQAf1hksY/utnYdU7kyYYVSpZHn6qUYoPK4CUV4tPlA==","mode":420,"size":2188},"CHANGELOG.md":{"checkedAt":1678883671918,"integrity":"sha512-QbD95UB5zuVkkHTPlM/JZ93osYIcmW3MPFekWSRjCNJO4x745qjl+zquNVNzjZntETGfhZA0hEaI35vFfvv8ow==","mode":420,"size":20232},"README.md":{"checkedAt":1678883671918,"integrity":"sha512-dackdlc8aw0J5mfth4N/WZIypQmy59SdeRRT8+5VjWKI1RnLQg5gg8bAGdlZoyQdy0u9tSW9iFpyTWmOTc6/lQ==","mode":420,"size":1825},".github/FUNDING.yml":{"checkedAt":1678883671918,"integrity":"sha512-gd8g2ChrSxZ0yyg7X5QeBsdAGG8mmnSXSWEoZZSzQ1QJF/UTN4ptGk/0ZuXcMSUCnmPNjyug7bkwq6Wca5Ztfw==","mode":420,"size":583}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"every.js","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAwChE,MAAM,UAAU,KAAK,CACnB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACpD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "es6-weak-map",
|
||||
"version": "2.0.3",
|
||||
"description": "ECMAScript6 WeakMap polyfill",
|
||||
"author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)",
|
||||
"keywords": [
|
||||
"map",
|
||||
"weakmap",
|
||||
"collection",
|
||||
"es6",
|
||||
"harmony",
|
||||
"list",
|
||||
"hash",
|
||||
"gc",
|
||||
"ponyfill"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/medikoo/es6-weak-map.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.46",
|
||||
"es6-iterator": "^2.0.3",
|
||||
"es6-symbol": "^3.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^5.5",
|
||||
"eslint-config-medikoo-es5": "^1.7",
|
||||
"tad": "^0.2.8"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "medikoo-es5",
|
||||
"root": true,
|
||||
"globals": {
|
||||
"WeakMap": true
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --ignore-path=.gitignore .",
|
||||
"test": "node ./node_modules/tad/bin/tad"
|
||||
},
|
||||
"license": "ISC"
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "git-url-parse",
|
||||
"version": "13.1.0",
|
||||
"description": "A high level git url parser for common git providers.",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"test": "node test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/IonicaBizau/git-url-parse.git"
|
||||
},
|
||||
"keywords": [
|
||||
"parse",
|
||||
"git",
|
||||
"url"
|
||||
],
|
||||
"author": "Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/IonicaBizau/git-url-parse/issues"
|
||||
},
|
||||
"homepage": "https://github.com/IonicaBizau/git-url-parse",
|
||||
"blah": {
|
||||
"h_img": "http://i.imgur.com/HlfMsVf.png"
|
||||
},
|
||||
"directories": {
|
||||
"example": "example",
|
||||
"test": "test"
|
||||
},
|
||||
"dependencies": {
|
||||
"git-up": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tester": "^1.3.1"
|
||||
},
|
||||
"files": [
|
||||
"bin/",
|
||||
"app/",
|
||||
"lib/",
|
||||
"dist/",
|
||||
"src/",
|
||||
"scripts/",
|
||||
"resources/",
|
||||
"menu/",
|
||||
"cli.js",
|
||||
"index.js",
|
||||
"bloggify.js",
|
||||
"bloggify.json",
|
||||
"bloggify/"
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"errorContext.js","sourceRoot":"","sources":["../../../../src/internal/util/errorContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,IAAI,OAAO,GAAgD,IAAI,CAAC;AAShE,MAAM,UAAU,YAAY,CAAC,EAAc;IACzC,IAAI,MAAM,CAAC,qCAAqC,EAAE;QAChD,IAAM,MAAM,GAAG,CAAC,OAAO,CAAC;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SAC/C;QACD,EAAE,EAAE,CAAC;QACL,IAAI,MAAM,EAAE;YACJ,IAAA,KAAyB,OAAQ,EAA/B,WAAW,iBAAA,EAAE,KAAK,WAAa,CAAC;YACxC,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,WAAW,EAAE;gBACf,MAAM,KAAK,CAAC;aACb;SACF;KACF;SAAM;QAGL,EAAE,EAAE,CAAC;KACN;AACH,CAAC;AAMD,MAAM,UAAU,YAAY,CAAC,GAAQ;IACnC,IAAI,MAAM,CAAC,qCAAqC,IAAI,OAAO,EAAE;QAC3D,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAC3B,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;KACrB;AACH,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0.00901,"52":0,"53":0,"54":0,"55":0,"56":0.00451,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0.01352,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00451,"79":0,"80":0.00451,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0.00451,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0.00901,"98":0.00451,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0.00901,"108":0.04958,"109":0.40563,"110":0.31098,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.02254,"50":0,"51":0,"52":0,"53":0.07662,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0.00451,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.01352,"80":0,"81":0,"83":0.00901,"84":0,"85":0,"86":0,"87":0.00451,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0.00451,"102":0,"103":0.01803,"104":0,"105":0.02704,"106":0.06761,"107":0.07211,"108":0.34704,"109":11.04666,"110":5.30474,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.00451,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.00901,"95":0,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0.01352,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.00451,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0.00451,"106":0,"107":0,"108":0,"109":0.44169,"110":0.55436},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.02704,"14":0.01803,"15":0.01803,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0.00451,"12.1":0.00451,"13.1":0.04056,"14.1":0.03155,"15.1":0.01803,"15.2-15.3":0.00451,"15.4":0.01352,"15.5":0.04958,"15.6":0.47324,"16.0":0.04958,"16.1":0.02254,"16.2":0.14873,"16.3":0.23436,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0,"11.0-11.2":0,"11.3-11.4":0,"12.0-12.1":0.01645,"12.2-12.5":0.25004,"13.0-13.1":0.04935,"13.2":0.03948,"13.3":0.02303,"13.4-13.7":0.11515,"14.0-14.4":0.95081,"14.5-14.8":1.21072,"15.0-15.1":0.46718,"15.2-15.3":0.33558,"15.4":0.35861,"15.5":1.26994,"15.6":3.61571,"16.0":3.52688,"16.1":7.6361,"16.2":8.04735,"16.3":4.00064,"16.4":0},P:{"4":0,"20":1.60163,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.06082,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0.01014,"12.0":0,"13.0":0.04055,"14.0":0.09123,"15.0":0.04055,"16.0":0.13178,"17.0":0.03041,"18.0":0.24329,"19.0":3.06134},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0.02704,"11":0.06761,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.21423},H:{"0":0.052},L:{"0":39.39982},R:{_:"0"},M:{"0":0.27465},Q:{"13.1":0}};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"F A B","2":"J D E CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB I v J D E F A B C K L EC FC"},D:{"1":"6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","132":"0 1 2 3 4 5 I v J D E F A B C K L G M N O w g x y z"},E:{"1":"D E F A B C K L G JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","16":"J HC zB","132":"I v IC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e rB","2":"F B PC QC RC SC qB AC TC","16":"C","132":"G M"},G:{"1":"E YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","16":"zB UC BC","132":"VC WC XC"},H:{"2":"oC"},I:{"1":"f tC uC","16":"pC qC","132":"tB I rC sC BC"},J:{"132":"D A"},K:{"1":"h rB","2":"A B qB AC","16":"C"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:5,C:"KeyboardEvent.location"};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"jsxRuntime.umd.js","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nlet vnodeId = 0;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = {},\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'ref') {\n\t\t\tref = props[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (typeof normalizedProps[i] === 'undefined') {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment\n};\n"],"names":["vnodeId","createVNode","type","props","key","isStaticChildren","__source","__self","ref","i","normalizedProps","vnode","__k","__","__b","__e","__d","undefined","__c","__h","constructor","__v","defaultProps","options"],"mappings":"0QAIA,IAAIA,EAAU,EAsBd,SAASC,EAAYC,EAAMC,EAAOC,EAAKC,EAAkBC,EAAUC,GAIlE,IACCC,EACAC,EAFGC,EAAkB,GAGtB,IAAKD,KAAKN,EACA,OAALM,EACHD,EAAML,EAAMM,GAEZC,EAAgBD,GAAKN,EAAMM,GAI7B,IAAME,EAAQ,CACbT,KAAAA,EACAC,MAAOO,EACPN,IAAAA,EACAI,IAAAA,EACAI,IAAW,KACXC,GAAS,KACTC,IAAQ,EACRC,IAAM,KACNC,SAAUC,EACVC,IAAY,KACZC,IAAY,KACZC,iBAAaH,EACbI,MAAarB,EACbM,SAAAA,EACAC,OAAAA,GAKD,GAAoB,mBAATL,IAAwBM,EAAMN,EAAKoB,cAC7C,IAAKb,KAAKD,OACyB,IAAvBE,EAAgBD,KAC1BC,EAAgBD,GAAKD,EAAIC,IAK5B,OADIc,EAAOA,QAACZ,OAAOY,EAAAA,QAAQZ,MAAMA,GAC1BA,CACP"}
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
Methods to exclude.
|
||||
*/
|
||||
type ArrayLengthMutationKeys = 'splice' | 'push' | 'pop' | 'shift' | 'unshift';
|
||||
|
||||
/**
|
||||
Create a type that represents an array of the given type and length. The array's length and the `Array` prototype methods that manipulate its length are excluded in the resulting type.
|
||||
|
||||
Please participate in [this issue](https://github.com/microsoft/TypeScript/issues/26223) if you want to have a similiar type built into TypeScript.
|
||||
|
||||
Use-cases:
|
||||
- Declaring fixed-length tuples or arrays with a large number of items.
|
||||
- Creating a range union (for example, `0 | 1 | 2 | 3 | 4` from the keys of such a type) without having to resort to recursive types.
|
||||
- Creating an array of coordinates with a static length, for example, length of 3 for a 3D vector.
|
||||
|
||||
Note: This type does not prevent out-of-bounds access. Prefer `ReadonlyTuple` unless you need mutability.
|
||||
|
||||
@example
|
||||
```
|
||||
import type {FixedLengthArray} from 'type-fest';
|
||||
|
||||
type FencingTeam = FixedLengthArray<string, 3>;
|
||||
|
||||
const guestFencingTeam: FencingTeam = ['Josh', 'Michael', 'Robert'];
|
||||
|
||||
const homeFencingTeam: FencingTeam = ['George', 'John'];
|
||||
//=> error TS2322: Type string[] is not assignable to type 'FencingTeam'
|
||||
|
||||
guestFencingTeam.push('Sam');
|
||||
//=> error TS2339: Property 'push' does not exist on type 'FencingTeam'
|
||||
```
|
||||
|
||||
@category Array
|
||||
@see ReadonlyTuple
|
||||
*/
|
||||
export type FixedLengthArray<Element, Length extends number, ArrayPrototype = [Element, ...Element[]]> = Pick<
|
||||
ArrayPrototype,
|
||||
Exclude<keyof ArrayPrototype, ArrayLengthMutationKeys>
|
||||
> & {
|
||||
[index: number]: Element;
|
||||
[Symbol.iterator]: () => IterableIterator<Element>;
|
||||
readonly length: Length;
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2015 Chen Gengyuan, Inspect JS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION 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,0 +1 @@
|
||||
{"version":3,"file":"windowCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":";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,CAAC;aACxC;QACH,CAAC,EACD;YACE,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD;YACE,MAAM,GAAG,IAAK,CAAC;YACf,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,64 @@
|
||||
declare namespace registryAuthToken {
|
||||
/**
|
||||
* The options for passing into `registry-auth-token`
|
||||
*/
|
||||
interface AuthOptions {
|
||||
/**
|
||||
* Whether or not url's path parts are recursively trimmed from the registry
|
||||
* url when searching for tokens
|
||||
*/
|
||||
recursive?: boolean | undefined;
|
||||
/**
|
||||
* An npmrc configuration object used when searching for tokens. If no object is provided,
|
||||
* the `.npmrc` file at the base of the project is used.
|
||||
*/
|
||||
npmrc?: {
|
||||
/**
|
||||
* A registry url used for matching
|
||||
*/
|
||||
registry?: string | undefined;
|
||||
/**
|
||||
* Registry url's with token information
|
||||
*/
|
||||
[registryUrls: string]: string | undefined;
|
||||
} | undefined;
|
||||
}
|
||||
/**
|
||||
* The generated authentication information
|
||||
*/
|
||||
interface NpmCredentials {
|
||||
/**
|
||||
* The token representing the users credentials
|
||||
*/
|
||||
token: string;
|
||||
/**
|
||||
* The type of token
|
||||
*/
|
||||
type: 'Basic' | 'Bearer';
|
||||
/**
|
||||
* The username used in `Basic`
|
||||
*/
|
||||
username?: string | undefined;
|
||||
/**
|
||||
* The password used in `Basic`
|
||||
*/
|
||||
password?: string | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the auth token to use for a given registry URL
|
||||
*
|
||||
* @param registryUrl - Either the registry url used for matching, or a configuration
|
||||
* object describing the contents of the .npmrc file
|
||||
* @param [options] - a configuration object describing the
|
||||
* contents of the .npmrc file. If an `npmrc` config object was passed in as the
|
||||
* first parameter, this parameter is ignored.
|
||||
* @returns The `NpmCredentials` object or undefined if no match found.
|
||||
*/
|
||||
declare function registryAuthToken(
|
||||
registryUrl: string | registryAuthToken.AuthOptions,
|
||||
options?: registryAuthToken.AuthOptions,
|
||||
): registryAuthToken.NpmCredentials | undefined;
|
||||
|
||||
export = registryAuthToken;
|
||||
@@ -0,0 +1,34 @@
|
||||
import { SHA2 } from './_sha2.js';
|
||||
declare class SHA256 extends SHA2<SHA256> {
|
||||
A: number;
|
||||
B: number;
|
||||
C: number;
|
||||
D: number;
|
||||
E: number;
|
||||
F: number;
|
||||
G: number;
|
||||
H: number;
|
||||
constructor();
|
||||
protected get(): [number, number, number, number, number, number, number, number];
|
||||
protected set(A: number, B: number, C: number, D: number, E: number, F: number, G: number, H: number): void;
|
||||
protected process(view: DataView, offset: number): void;
|
||||
protected roundClean(): void;
|
||||
destroy(): void;
|
||||
}
|
||||
/**
|
||||
* SHA2-256 hash function
|
||||
* @param message - data that would be hashed
|
||||
*/
|
||||
export declare const sha256: {
|
||||
(message: import("./utils.js").Input): Uint8Array;
|
||||
outputLen: number;
|
||||
blockLen: number;
|
||||
create(): import("./utils.js").Hash<SHA256>;
|
||||
};
|
||||
export declare const sha224: {
|
||||
(message: import("./utils.js").Input): Uint8Array;
|
||||
outputLen: number;
|
||||
blockLen: number;
|
||||
create(): import("./utils.js").Hash<SHA256>;
|
||||
};
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../src/internal/Notification.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAo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,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAC;KAC7D;IACD,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,IAAI,+CAAb,QAAQ,EAAQ,KAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,KAAK,+CAAd,QAAQ,EAAS,KAAK,CAAC,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,QAAQ,+CAAjB,QAAQ,CAAa,CAAC;AAC1G,CAAC"}
|
||||
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
|
||||
var functionsHaveNames = function functionsHaveNames() {
|
||||
return typeof function f() {}.name === 'string';
|
||||
};
|
||||
|
||||
var gOPD = Object.getOwnPropertyDescriptor;
|
||||
if (gOPD) {
|
||||
try {
|
||||
gOPD([], 'length');
|
||||
} catch (e) {
|
||||
// IE 8 has a broken gOPD
|
||||
gOPD = null;
|
||||
}
|
||||
}
|
||||
|
||||
functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
|
||||
if (!functionsHaveNames() || !gOPD) {
|
||||
return false;
|
||||
}
|
||||
var desc = gOPD(function () {}, 'name');
|
||||
return !!desc && !!desc.configurable;
|
||||
};
|
||||
|
||||
var $bind = Function.prototype.bind;
|
||||
|
||||
functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {
|
||||
return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';
|
||||
};
|
||||
|
||||
module.exports = functionsHaveNames;
|
||||
@@ -0,0 +1,75 @@
|
||||
import { EMPTY_OBJ } from './constants';
|
||||
import { commitRoot, diff } from './diff/index';
|
||||
import { createElement, Fragment } from './create-element';
|
||||
import options from './options';
|
||||
import { slice } from './util';
|
||||
|
||||
/**
|
||||
* Render a Preact virtual node into a DOM element
|
||||
* @param {import('./internal').ComponentChild} vnode The virtual node to render
|
||||
* @param {import('./internal').PreactElement} parentDom The DOM element to
|
||||
* render into
|
||||
* @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an
|
||||
* existing DOM tree rooted at `replaceNode`
|
||||
*/
|
||||
export function render(vnode, parentDom, replaceNode) {
|
||||
if (options._root) options._root(vnode, parentDom);
|
||||
|
||||
// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in
|
||||
// hydration mode or not by passing the `hydrate` function instead of a DOM
|
||||
// element..
|
||||
let isHydrating = typeof replaceNode === 'function';
|
||||
|
||||
// To be able to support calling `render()` multiple times on the same
|
||||
// DOM node, we need to obtain a reference to the previous tree. We do
|
||||
// this by assigning a new `_children` property to DOM nodes which points
|
||||
// to the last rendered tree. By default this property is not present, which
|
||||
// means that we are mounting a new tree for the first time.
|
||||
let oldVNode = isHydrating
|
||||
? null
|
||||
: (replaceNode && replaceNode._children) || parentDom._children;
|
||||
|
||||
vnode = (
|
||||
(!isHydrating && replaceNode) ||
|
||||
parentDom
|
||||
)._children = createElement(Fragment, null, [vnode]);
|
||||
|
||||
// List of effects that need to be called after diffing.
|
||||
let commitQueue = [];
|
||||
diff(
|
||||
parentDom,
|
||||
// Determine the new vnode tree and store it on the DOM element on
|
||||
// our custom `_children` property.
|
||||
vnode,
|
||||
oldVNode || EMPTY_OBJ,
|
||||
EMPTY_OBJ,
|
||||
parentDom.ownerSVGElement !== undefined,
|
||||
!isHydrating && replaceNode
|
||||
? [replaceNode]
|
||||
: oldVNode
|
||||
? null
|
||||
: parentDom.firstChild
|
||||
? slice.call(parentDom.childNodes)
|
||||
: null,
|
||||
commitQueue,
|
||||
!isHydrating && replaceNode
|
||||
? replaceNode
|
||||
: oldVNode
|
||||
? oldVNode._dom
|
||||
: parentDom.firstChild,
|
||||
isHydrating
|
||||
);
|
||||
|
||||
// Flush all queued effects
|
||||
commitRoot(commitQueue, vnode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing DOM element with data from a Preact virtual node
|
||||
* @param {import('./internal').ComponentChild} vnode The virtual node to render
|
||||
* @param {import('./internal').PreactElement} parentDom The DOM element to
|
||||
* update
|
||||
*/
|
||||
export function hydrate(vnode, parentDom) {
|
||||
render(vnode, parentDom, hydrate);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
export type ResponsePermission = {
|
||||
id: number;
|
||||
principal: any;
|
||||
target: ResponsePermission.target;
|
||||
action: ResponsePermission.action;
|
||||
};
|
||||
export declare namespace ResponsePermission {
|
||||
enum target {
|
||||
RUNNER = "RUNNER",
|
||||
ORGANIZATION = "ORGANIZATION",
|
||||
TEAM = "TEAM",
|
||||
TRACK = "TRACK",
|
||||
USER = "USER",
|
||||
USERGROUP = "USERGROUP",
|
||||
PERMISSION = "PERMISSION",
|
||||
STATSCLIENT = "STATSCLIENT",
|
||||
DONOR = "DONOR",
|
||||
SCAN = "SCAN",
|
||||
STATION = "STATION",
|
||||
CARD = "CARD",
|
||||
DONATION = "DONATION",
|
||||
CONTACT = "CONTACT",
|
||||
MAIL = "MAIL"
|
||||
}
|
||||
enum action {
|
||||
GET = "GET",
|
||||
CREATE = "CREATE",
|
||||
UPDATE = "UPDATE",
|
||||
DELETE = "DELETE",
|
||||
IMPORT = "IMPORT"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/minimist
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0.00676,"56":0,"57":0.00338,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00338,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0.00338,"78":0.00338,"79":0,"80":0,"81":0,"82":0.00338,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00338,"93":0,"94":0.00338,"95":0,"96":0,"97":0,"98":0.00338,"99":0.00338,"100":0.00338,"101":0.00676,"102":0.00338,"103":0.00338,"104":0.00338,"105":0.00676,"106":0.00338,"107":0.02365,"108":0.03717,"109":0.2095,"110":0.11827,"111":0.00338,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00338,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0.01014,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0.00676,"56":0.00338,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0.01014,"66":0.00338,"67":0.00338,"68":0.00338,"69":0.02027,"70":0.03717,"71":0,"72":0,"73":0,"74":0.00338,"75":0,"76":0,"77":0,"78":0.00676,"79":0.00338,"80":0.00338,"81":0.01352,"83":0.00338,"84":0,"85":0,"86":0,"87":0.02027,"88":0.09123,"89":0.00676,"90":0.01014,"91":0.00676,"92":0.01014,"93":0,"94":0.00676,"95":0.01014,"96":0.00676,"97":0.00676,"98":0.00338,"99":0.00676,"100":0.01014,"101":0.00338,"102":0.01014,"103":0.20612,"104":0.0169,"105":0.0169,"106":0.04055,"107":0.04055,"108":0.12502,"109":2.26731,"110":1.50703,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00338,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0.00338,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0.00338,"62":0,"63":0.00338,"64":0.00676,"65":0.00338,"66":0.00338,"67":0.04731,"68":0,"69":0,"70":0,"71":0,"72":0.00676,"73":0.03717,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0.00338,"90":0,"91":0,"92":0.00338,"93":0.02027,"94":0.05406,"95":0.07096,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0.00676,"13":0.00676,"14":0.00338,"15":0.00338,"16":0.00676,"17":0.01014,"18":0.03041,"79":0,"80":0.00338,"81":0,"83":0,"84":0.02027,"85":0.00338,"86":0,"87":0,"88":0,"89":0.01352,"90":0.03379,"91":0,"92":0.03041,"93":0,"94":0,"95":0.00676,"96":0,"97":0,"98":0.01014,"99":0.00338,"100":0.00676,"101":0.00338,"102":0,"103":0.00676,"104":0.00676,"105":0.01014,"106":0.00676,"107":0.04055,"108":0.0811,"109":0.59808,"110":0.65553},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0.00338,"11":0,"12":0,"13":0,"14":0.00338,"15":0.00338,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.00338,"13.1":0.0169,"14.1":0.0169,"15.1":0,"15.2-15.3":0.00676,"15.4":0,"15.5":0.00338,"15.6":0.05406,"16.0":0.00676,"16.1":0.01014,"16.2":0.02027,"16.3":0.02027,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0.00142,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0.01494,"9.3":0.01032,"10.0-10.2":0.00071,"10.3":0.01316,"11.0-11.2":0.0064,"11.3-11.4":0.01565,"12.0-12.1":0.00854,"12.2-12.5":0.13802,"13.0-13.1":0.00462,"13.2":0.00036,"13.3":0.01316,"13.4-13.7":0.16221,"14.0-14.4":0.09213,"14.5-14.8":0.07506,"15.0-15.1":0.19885,"15.2-15.3":0.09356,"15.4":0.0996,"15.5":0.3045,"15.6":0.40233,"16.0":0.16577,"16.1":0.40233,"16.2":0.3849,"16.3":0.70221,"16.4":0},P:{"4":0.11192,"20":0.31541,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.46803,"8.2":0,"9.2":0.24419,"10.1":0.02035,"11.1-11.2":0.09157,"12.0":0.03052,"13.0":0.21367,"14.0":0.15262,"15.0":0.07122,"16.0":0.54943,"17.0":0.10175,"18.0":0.22384,"19.0":1.42444},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.01015,"4.4":0,"4.4.3-4.4.4":0.18013},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0.00737,"11":0.03318,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0.05959,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":1.8605},H:{"0":1.37903},L:{"0":78.89899},R:{_:"0"},M:{"0":0.19201},Q:{"13.1":0.00662}};
|
||||
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
var resolveException = require("../lib/resolve-exception")
|
||||
, isValue = require("../value/is")
|
||||
, is = require("./is");
|
||||
|
||||
var resolveCoercedValue = function (value, coerceItem) {
|
||||
var coercedValue = [];
|
||||
var iterator = value[Symbol.iterator]();
|
||||
var item;
|
||||
while (!(item = iterator.next()).done) {
|
||||
var newItemValue = coerceItem(item.value);
|
||||
if (!isValue(newItemValue)) throw new Error("Stop propagation");
|
||||
coercedValue.push(newItemValue);
|
||||
}
|
||||
return coercedValue;
|
||||
};
|
||||
module.exports = function (value/*, options*/) {
|
||||
var options = arguments[1];
|
||||
if (is(value, options)) {
|
||||
if (!options) return value;
|
||||
if (typeof options.coerceItem !== "function") return value;
|
||||
try { return resolveCoercedValue(value, options.coerceItem); }
|
||||
catch (error) {
|
||||
// Ignore, let validation error propagate
|
||||
}
|
||||
}
|
||||
return resolveException(value, "%v is not expected iterable value", options);
|
||||
};
|
||||
@@ -0,0 +1,80 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash');
|
||||
var test = require('tape');
|
||||
var sum = require('./');
|
||||
|
||||
test('creates unique hashes', function (t) {
|
||||
var cases = [];
|
||||
|
||||
test_case([0,1,2,3]);
|
||||
test_case({0:0,1:1,2:2,3:3});
|
||||
test_case({0:0,1:1,2:2,3:3,length:4});
|
||||
test_case({url:12});
|
||||
test_case({headers:12});
|
||||
test_case({headers:122});
|
||||
test_case({headers:'122'});
|
||||
test_case({headers:{accept:'text/plain'}});
|
||||
test_case({payload:[0,1,2,3],headers:[{a:'b'}]});
|
||||
test_case({a:function () {}});
|
||||
test_case({b:function () {}});
|
||||
test_case({b:function (a) {}});
|
||||
test_case(function () {});
|
||||
test_case(function (a) {});
|
||||
test_case(function (b) {});
|
||||
test_case(function (a) { return a;});
|
||||
test_case(function (a) {return a;});
|
||||
test_case('', '\'\'');
|
||||
test_case('null', '\'null\'');
|
||||
test_case('false', '\'false\'');
|
||||
test_case('true', '\'true\'');
|
||||
test_case('0', '\'0\'');
|
||||
test_case('1', '\'1\'');
|
||||
test_case('void 0', '\'void 0\'');
|
||||
test_case('undefined', '\'undefined\'');
|
||||
test_case(null);
|
||||
test_case(false);
|
||||
test_case(true);
|
||||
test_case(Infinity);
|
||||
test_case(-Infinity);
|
||||
test_case(NaN);
|
||||
test_case(0);
|
||||
test_case(1);
|
||||
test_case(void 0);
|
||||
test_case({});
|
||||
test_case({a:{},b:{}});
|
||||
test_case({valueOf(){return 1}});
|
||||
test_case({valueOf(){return 2}});
|
||||
test_case([]);
|
||||
test_case(new Date());
|
||||
test_case(new Date(2019, 5, 28));
|
||||
test_case(new Date(1988, 5, 9));
|
||||
test_case(global, 'global');
|
||||
|
||||
const uniqCases = _.uniqBy(cases, 'hash')
|
||||
_.uniqBy(cases, 'hash').forEach(function (expected) {
|
||||
var matches = _.filter(cases, { hash: expected.hash })
|
||||
t.equal(matches.length, 1, expected.hash + ': ' + _.map(matches, 'value').join(' '))
|
||||
})
|
||||
|
||||
t.end();
|
||||
|
||||
function test_case(value, name) {
|
||||
var hash = sum(value);
|
||||
cases.push({ value, hash });
|
||||
console.log('%s from:', hash, name || value);
|
||||
}
|
||||
});
|
||||
|
||||
test('hashes clash if same properties', function (t) {
|
||||
equals(function () {}, function () {});
|
||||
equals(function (a) {}, function (a) {});
|
||||
equals({a:'1'},{a:'1'});
|
||||
equals({a:'1',b:1},{b:1,a:'1'});
|
||||
equals({valueOf(){return 1}},{valueOf(){return 1}});
|
||||
t.end();
|
||||
|
||||
function equals (a, b) {
|
||||
t.equal(sum(a), sum(b));
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { map } from './map';
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
export function exhaustMap(project, resultSelector) {
|
||||
if (resultSelector) {
|
||||
return (source) => source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));
|
||||
}
|
||||
return operate((source, subscriber) => {
|
||||
let index = 0;
|
||||
let innerSub = null;
|
||||
let isComplete = false;
|
||||
source.subscribe(createOperatorSubscriber(subscriber, (outerValue) => {
|
||||
if (!innerSub) {
|
||||
innerSub = createOperatorSubscriber(subscriber, undefined, () => {
|
||||
innerSub = null;
|
||||
isComplete && subscriber.complete();
|
||||
});
|
||||
innerFrom(project(outerValue, index++)).subscribe(innerSub);
|
||||
}
|
||||
}, () => {
|
||||
isComplete = true;
|
||||
!innerSub && subscriber.complete();
|
||||
}));
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=exhaustMap.js.map
|
||||
@@ -0,0 +1,59 @@
|
||||
'use strict';
|
||||
|
||||
const isWin = process.platform === 'win32';
|
||||
|
||||
function notFoundError(original, syscall) {
|
||||
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
||||
code: 'ENOENT',
|
||||
errno: 'ENOENT',
|
||||
syscall: `${syscall} ${original.command}`,
|
||||
path: original.command,
|
||||
spawnargs: original.args,
|
||||
});
|
||||
}
|
||||
|
||||
function hookChildProcess(cp, parsed) {
|
||||
if (!isWin) {
|
||||
return;
|
||||
}
|
||||
|
||||
const originalEmit = cp.emit;
|
||||
|
||||
cp.emit = function (name, arg1) {
|
||||
// If emitting "exit" event and exit code is 1, we need to check if
|
||||
// the command exists and emit an "error" instead
|
||||
// See https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
||||
if (name === 'exit') {
|
||||
const err = verifyENOENT(arg1, parsed, 'spawn');
|
||||
|
||||
if (err) {
|
||||
return originalEmit.call(cp, 'error', err);
|
||||
}
|
||||
}
|
||||
|
||||
return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
|
||||
};
|
||||
}
|
||||
|
||||
function verifyENOENT(status, parsed) {
|
||||
if (isWin && status === 1 && !parsed.file) {
|
||||
return notFoundError(parsed.original, 'spawn');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function verifyENOENTSync(status, parsed) {
|
||||
if (isWin && status === 1 && !parsed.file) {
|
||||
return notFoundError(parsed.original, 'spawnSync');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
hookChildProcess,
|
||||
verifyENOENT,
|
||||
verifyENOENTSync,
|
||||
notFoundError,
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
# Safe Integer Number
|
||||
|
||||
Safe integer _number_ primitive
|
||||
|
||||
## `safe-integer/coerce`
|
||||
|
||||
Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` in place of values which are beyond `Number.MIN_SAFE_INTEGER` and `Number.MAX_SAFE_INTEGER` range.
|
||||
|
||||
```javascript
|
||||
const coerceToSafeInteger = require("type/safe-integer/coerce");
|
||||
|
||||
coerceToInteger("12.95"); // 12
|
||||
coerceToInteger(9007199254740992); // null
|
||||
coerceToInteger(null); // null
|
||||
```
|
||||
|
||||
## `safe-integer/ensure`
|
||||
|
||||
If given argument is a safe integer coercible value (via [`safe-integer/coerce`](#safe-integercoerce)) returns result number.
|
||||
Otherwise `TypeError` is thrown.
|
||||
|
||||
```javascript
|
||||
const ensureSafeInteger = require("type/safe-integer/ensure");
|
||||
|
||||
ensureSafeInteger(12.93); // "12"
|
||||
ensureSafeInteger(9007199254740992); // Thrown TypeError: null is not a safe integer
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import AwaitBlock from '../../nodes/AwaitBlock';
|
||||
import FragmentWrapper from './Fragment';
|
||||
import PendingBlock from '../../nodes/PendingBlock';
|
||||
import ThenBlock from '../../nodes/ThenBlock';
|
||||
import CatchBlock from '../../nodes/CatchBlock';
|
||||
import { Context } from '../../nodes/shared/Context';
|
||||
import { Identifier, Literal, Node } from 'estree';
|
||||
declare type Status = 'pending' | 'then' | 'catch';
|
||||
declare class AwaitBlockBranch extends Wrapper {
|
||||
parent: AwaitBlockWrapper;
|
||||
node: PendingBlock | ThenBlock | CatchBlock;
|
||||
block: Block;
|
||||
fragment: FragmentWrapper;
|
||||
is_dynamic: boolean;
|
||||
var: any;
|
||||
status: Status;
|
||||
value: string;
|
||||
value_index: Literal;
|
||||
value_contexts: Context[];
|
||||
is_destructured: boolean;
|
||||
constructor(status: Status, renderer: Renderer, block: Block, parent: AwaitBlockWrapper, node: PendingBlock | ThenBlock | CatchBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
add_context(node: Node | null, contexts: Context[]): void;
|
||||
has_consts(node: PendingBlock | ThenBlock | CatchBlock): node is ThenBlock | CatchBlock;
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
render_get_context(): void;
|
||||
}
|
||||
export default class AwaitBlockWrapper extends Wrapper {
|
||||
node: AwaitBlock;
|
||||
pending: AwaitBlockBranch;
|
||||
then: AwaitBlockBranch;
|
||||
catch: AwaitBlockBranch;
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: AwaitBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
}
|
||||
export {};
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Slugger generates header id
|
||||
*/
|
||||
module.exports = class Slugger {
|
||||
constructor() {
|
||||
this.seen = {};
|
||||
}
|
||||
|
||||
serialize(value) {
|
||||
return value
|
||||
.toLowerCase()
|
||||
.trim()
|
||||
// remove html tags
|
||||
.replace(/<[!\/a-z].*?>/ig, '')
|
||||
// remove unwanted chars
|
||||
.replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '')
|
||||
.replace(/\s/g, '-');
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the next safe (unique) slug to use
|
||||
*/
|
||||
getNextSafeSlug(originalSlug, isDryRun) {
|
||||
let slug = originalSlug;
|
||||
let occurenceAccumulator = 0;
|
||||
if (this.seen.hasOwnProperty(slug)) {
|
||||
occurenceAccumulator = this.seen[originalSlug];
|
||||
do {
|
||||
occurenceAccumulator++;
|
||||
slug = originalSlug + '-' + occurenceAccumulator;
|
||||
} while (this.seen.hasOwnProperty(slug));
|
||||
}
|
||||
if (!isDryRun) {
|
||||
this.seen[originalSlug] = occurenceAccumulator;
|
||||
this.seen[slug] = 0;
|
||||
}
|
||||
return slug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert string to unique id
|
||||
* @param {object} options
|
||||
* @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator.
|
||||
*/
|
||||
slug(value, options = {}) {
|
||||
const slug = this.serialize(value);
|
||||
return this.getNextSafeSlug(slug, options.dryrun);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer")
|
||||
, callable = require("../../object/valid-callable")
|
||||
, value = require("../../object/valid-value")
|
||||
, floor = Math.floor;
|
||||
|
||||
module.exports = function (compareFn) {
|
||||
var length, low, high, middle;
|
||||
|
||||
value(this);
|
||||
callable(compareFn);
|
||||
|
||||
length = toPosInt(this.length);
|
||||
low = 0;
|
||||
high = length - 1;
|
||||
|
||||
while (low <= high) {
|
||||
middle = floor((low + high) / 2);
|
||||
if (compareFn(this[middle]) < 0) high = middle - 1;
|
||||
else low = middle + 1;
|
||||
}
|
||||
|
||||
if (high < 0) return 0;
|
||||
if (high >= length) return length - 1;
|
||||
return high;
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"commonjs": true,
|
||||
"es6": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"rules": {
|
||||
"strict": 2,
|
||||
"indent": 0,
|
||||
"linebreak-style": 0,
|
||||
"quotes": 0,
|
||||
"semi": 0,
|
||||
"no-cond-assign": 1,
|
||||
"no-constant-condition": 1,
|
||||
"no-duplicate-case": 1,
|
||||
"no-empty": 1,
|
||||
"no-ex-assign": 1,
|
||||
"no-extra-boolean-cast": 1,
|
||||
"no-extra-semi": 1,
|
||||
"no-fallthrough": 1,
|
||||
"no-func-assign": 1,
|
||||
"no-global-assign": 1,
|
||||
"no-implicit-globals": 2,
|
||||
"no-inner-declarations": ["error", "functions"],
|
||||
"no-irregular-whitespace": 2,
|
||||
"no-loop-func": 1,
|
||||
"no-multi-str": 1,
|
||||
"no-mixed-spaces-and-tabs": 1,
|
||||
"no-proto": 1,
|
||||
"no-sequences": 1,
|
||||
"no-throw-literal": 1,
|
||||
"no-unmodified-loop-condition": 1,
|
||||
"no-useless-call": 1,
|
||||
"no-void": 1,
|
||||
"no-with": 2,
|
||||
"wrap-iife": 1,
|
||||
"no-redeclare": 1,
|
||||
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
|
||||
"no-sparse-arrays": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.0.3](https://github.com/es-shims/globalThis/compare/v1.0.2...v1.0.3) - 2022-05-07
|
||||
|
||||
### Commits
|
||||
|
||||
- [actions] reuse common workflows [`65891e4`](https://github.com/es-shims/globalThis/commit/65891e4d285ae04e216ff01160cff861e0e41a4f)
|
||||
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`82f8481`](https://github.com/es-shims/globalThis/commit/82f84815027f666f625e1ccb41f723800a05d016)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`53afc39`](https://github.com/es-shims/globalThis/commit/53afc39bfd3eb262c5e6e9dfd25e4f81f3578c1c)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`03169d4`](https://github.com/es-shims/globalThis/commit/03169d4254c9ef177d6537becca5b0b56df50d91)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`4986e3e`](https://github.com/es-shims/globalThis/commit/4986e3e20c5f664601871a0fac68c1efd0a68472)
|
||||
- [actions] update codecov uploader [`15c4b06`](https://github.com/es-shims/globalThis/commit/15c4b062b1a9434dbec93604ed31b6893d11d458)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`8b04a74`](https://github.com/es-shims/globalThis/commit/8b04a749d3cb2f825920beb700899f0c13ad2fb8)
|
||||
- [Fix] `globalThis` should be writable [`8759985`](https://github.com/es-shims/globalThis/commit/87599852d5f91e2e1f06e424cdefcd443ec98476)
|
||||
- [readme] add github actions/codecov badges [`0263f0d`](https://github.com/es-shims/globalThis/commit/0263f0debfa982b928fcd301b11fe3e3193bf33d)
|
||||
- [Dev Deps] update `aud`, `eslint`, `tape` [`e88d296`](https://github.com/es-shims/globalThis/commit/e88d296bb026633bdd1be2e1542903a5d0107cd8)
|
||||
- [meta] use `prepublishOnly` script for npm 7+ [`c81fde6`](https://github.com/es-shims/globalThis/commit/c81fde6a9e44345e56dada588e16db736809ddd9)
|
||||
- [Tests] nycignore `dist` [`bde0c0d`](https://github.com/es-shims/globalThis/commit/bde0c0df46f684316ab414da1487a0cd2efe3eeb)
|
||||
- [meta] gitignore coverage output [`79f73f8`](https://github.com/es-shims/globalThis/commit/79f73f8b0c1180567fba473f92c07d71efd4dd0b)
|
||||
|
||||
## [v1.0.2](https://github.com/es-shims/globalThis/compare/v1.0.1...v1.0.2) - 2021-02-22
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] migrate tests to Github Actions [`a3f50f7`](https://github.com/es-shims/globalThis/commit/a3f50f77a392c0ffdaca18fb5881743b874d0a6f)
|
||||
- [meta] do not publish github action workflow files [`eb5c787`](https://github.com/es-shims/globalThis/commit/eb5c7879317cd7f1fde52228660be8e779c9d4e3)
|
||||
- [Tests] add `implementation` est; run `es-shim-api` in postlint; use `tape` runner [`c9dd792`](https://github.com/es-shims/globalThis/commit/c9dd792d492ec9744a5e5d5033e919b94d441bac)
|
||||
- [Tests] fix native tests [`6b76dff`](https://github.com/es-shims/globalThis/commit/6b76dff3af3fe9bcd7b24d48c6ba55116169e840)
|
||||
- [Tests] run `nyc` on all tests [`0407f79`](https://github.com/es-shims/globalThis/commit/0407f79f64bf9fc30111f3bf4dff7e4205331fb6)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape`, `browserify` [`b8cc020`](https://github.com/es-shims/globalThis/commit/b8cc020e5ecc2d5a5a5b4160aabc60cc42d50c03)
|
||||
- [actions] add "Allow Edits" workflow [`e2854df`](https://github.com/es-shims/globalThis/commit/e2854df653667b16ff34a7a0a7b677231dfe2b02)
|
||||
- [readme] remove travis badge [`262eb76`](https://github.com/es-shims/globalThis/commit/262eb76e4e0d3f2df354cc6aff1b18f50c7b147f)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`; add `safe-publish-latest` [`3c76883`](https://github.com/es-shims/globalThis/commit/3c7688325f6aa050afe3ed978e423e70974e4d3b)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`7276123`](https://github.com/es-shims/globalThis/commit/727612396262fc22275f44159ec5b39115dc359f)
|
||||
- [actions] update workflows [`bcb0f42`](https://github.com/es-shims/globalThis/commit/bcb0f42c319cf19746e03a6667cf25d3e835f46e)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5485851`](https://github.com/es-shims/globalThis/commit/548585148e874d6eb0b0463526a88e8b64e7c5eb)
|
||||
- [Dev Deps] update `auto-changelog`, `tape` [`6a01da3`](https://github.com/es-shims/globalThis/commit/6a01da3f321983d1970d793711d31cf8508ef94d)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7a07f4e`](https://github.com/es-shims/globalThis/commit/7a07f4ebc5580933b40bbe67f357632e0f7d5586)
|
||||
- [meta] only run the build script in publish [`797e492`](https://github.com/es-shims/globalThis/commit/797e492519ed0bf6270537290e69ca0456790575)
|
||||
- [meta] combine duplicate `prepublish` scripts [`92bbef0`](https://github.com/es-shims/globalThis/commit/92bbef0f91f6e91163186f68b5f5f1ffd26c479d)
|
||||
- [Dev Deps] update `auto-changelog`; add `aud` [`be6dbec`](https://github.com/es-shims/globalThis/commit/be6dbecefddb40493c5568a2cbe83f74e2e0385f)
|
||||
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bfd54f8`](https://github.com/es-shims/globalThis/commit/bfd54f8388758e7dec618dc34956e7075a7c15f0)
|
||||
- [Tests] only audit prod deps [`0f64b47`](https://github.com/es-shims/globalThis/commit/0f64b47acfa812affbacbe487fcb0f6c02eccc25)
|
||||
|
||||
## [v1.0.1](https://github.com/es-shims/globalThis/compare/v1.0.0...v1.0.1) - 2019-12-15
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Refactor] only use `global` in node; only check browser globals in browsers [`#2`](https://github.com/es-shims/globalThis/issues/2)
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] use shared travis-ci configs [`edb1cc9`](https://github.com/es-shims/globalThis/commit/edb1cc9d900a40e8c1732264b6e85d4f9760920c)
|
||||
- [Tests] remove `jscs` [`1847ac2`](https://github.com/es-shims/globalThis/commit/1847ac2487e2c13cf8bf717211c6a93fe60831f9)
|
||||
- [meta] add `auto-changelog` [`933c381`](https://github.com/es-shims/globalThis/commit/933c381083890965ac848d3da21ed9e910cc09cf)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `tape` [`93310bc`](https://github.com/es-shims/globalThis/commit/93310bc01ddacbe23a93b3022daebc9b6f6ae8c3)
|
||||
- [actions] add automatic rebasing / merge commit blocking [`231dec5`](https://github.com/es-shims/globalThis/commit/231dec511c42e1509035d176e2451c55de20bfe7)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `covert`, `is`, `tape` [`e50c1f6`](https://github.com/es-shims/globalThis/commit/e50c1f6d2d45c66f53ffda471bbf62c08ed15c9b)
|
||||
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`4abd340`](https://github.com/es-shims/globalThis/commit/4abd3400fc8942963e77515d0cf2fbcac3cb7bc8)
|
||||
- [meta] add `funding` field [`2d1f9eb`](https://github.com/es-shims/globalThis/commit/2d1f9eb00b2dea46f6de7d563b31db17f44f1899)
|
||||
- [meta] remove unused deps [`5bd6bef`](https://github.com/es-shims/globalThis/commit/5bd6befefbaf0c7e6f70eb3c1919b5c5a271d29d)
|
||||
- readme: Fix casing + phrasing [`66379cc`](https://github.com/es-shims/globalThis/commit/66379ccf5008f7676aac5f3dec1ea2fe55e3516c)
|
||||
- [Deps] update `define-properties`, `object-keys` [`4585e5a`](https://github.com/es-shims/globalThis/commit/4585e5ab461093ab6c62ce0b22b959925e8f818c)
|
||||
- fix issue with Webpack's CaseSensitivePathsPlugin [`842e84e`](https://github.com/es-shims/globalThis/commit/842e84e0096c9eea660c78fd19c9c07799b81537)
|
||||
|
||||
## v1.0.0 - 2018-08-10
|
||||
|
||||
### Commits
|
||||
|
||||
- Dotfiles. [`f01b02d`](https://github.com/es-shims/globalThis/commit/f01b02d315865c812e5b9158f71bb18f3b153def)
|
||||
- [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm`; improve matrix [`ed1fa5d`](https://github.com/es-shims/globalThis/commit/ed1fa5d473d933b3270410b658183dc1c556a663)
|
||||
- Tests [`ab99527`](https://github.com/es-shims/globalThis/commit/ab99527e3c434e89dd40f8cba3b0e2e976156611)
|
||||
- [breaking] update property name, rename repo [`be42e3d`](https://github.com/es-shims/globalThis/commit/be42e3dce08b62a78260d487f62fa69b410d7918)
|
||||
- package.json [`ca43a36`](https://github.com/es-shims/globalThis/commit/ca43a363e3ce0dbc2d4623169f8cb3d792f8bc84)
|
||||
- implementation [`80b5a40`](https://github.com/es-shims/globalThis/commit/80b5a403ef532254b2af46ec3ba5f442a308a57d)
|
||||
- read me [`f6df9b3`](https://github.com/es-shims/globalThis/commit/f6df9b3b69977f04e080d1720ba1203c13447884)
|
||||
- Rename `System.global` to `global` [`fa8503c`](https://github.com/es-shims/globalThis/commit/fa8503cf94afe84b3729dd5b0e9f73f481fb1fee)
|
||||
- Initial commit [`99f1dc3`](https://github.com/es-shims/globalThis/commit/99f1dc328d0b4c52a550037de0139d5452ac01de)
|
||||
- [Tests] up to `node` `v6.7`, `v5.12`, `v4.6`; improve test matrix [`712ec0e`](https://github.com/es-shims/globalThis/commit/712ec0e545d1603c4e23f4ff1acb066cc4a3c9ee)
|
||||
- [Dev Deps] update `browserify`, `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`73278bd`](https://github.com/es-shims/globalThis/commit/73278bd638d1e762eb7415350a738f5d345896f5)
|
||||
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `browserify`, `eslint`, `for-each`, `is`, `nsp`, `tape` [`75fa992`](https://github.com/es-shims/globalThis/commit/75fa9929be81afec43895c02e33d0b8a78f11d1f)
|
||||
- [Dev Deps] update `browserify`, `is`, `tape`, `nsp`, `eslint` [`b223e86`](https://github.com/es-shims/globalThis/commit/b223e86d0868efb1f0c966370ff2f822516d6956)
|
||||
- [Tests] fix linting; remove parallelshell [`271b329`](https://github.com/es-shims/globalThis/commit/271b329d174b94c08913060752a2e9f9116fe5b8)
|
||||
- [Deps] update `function-bind`, `object-keys` [`002d0c5`](https://github.com/es-shims/globalThis/commit/002d0c5685a83f97e014a8a07134eb621794c649)
|
||||
- Only apps should have lockfiles [`960f1d0`](https://github.com/es-shims/globalThis/commit/960f1d00598cbba5427849c863eb10b8de82fb1b)
|
||||
- [Tests] on `node` `v10.8` [`37fad9d`](https://github.com/es-shims/globalThis/commit/37fad9db9860c654efe0a32ec187f21730d5fed8)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`df28dfe`](https://github.com/es-shims/globalThis/commit/df28dfe7f0daf3db95a536a6ce64062bd706185d)
|
||||
- [New] add `auto` entry point [`86eb2ab`](https://github.com/es-shims/globalThis/commit/86eb2ab4c4dc2babff20ac436cf7fb7f8da7d2f2)
|
||||
- [Dev Deps] update `eslint` [`1bdc1aa`](https://github.com/es-shims/globalThis/commit/1bdc1aacfb94dcdc7bb61688c7634c435012e35d)
|
||||
- [Deps] update `object-keys` [`72cdbf5`](https://github.com/es-shims/globalThis/commit/72cdbf596b16103ee711d52b2b645b42efc08c51)
|
||||
- Update most common usage to invoke the function upon being required [`5026296`](https://github.com/es-shims/globalThis/commit/502629660da2c21cfb0f8ca233e2b9d427c052fe)
|
||||
@@ -0,0 +1,16 @@
|
||||
import { h } from 'preact';
|
||||
import Tabular from '../../tabular';
|
||||
import { BaseComponent, BaseProps } from '../base';
|
||||
import Header from '../../header';
|
||||
import { Status } from '../../types';
|
||||
interface TableProps extends BaseProps {
|
||||
data: Tabular;
|
||||
status: Status;
|
||||
header?: Header;
|
||||
width: string;
|
||||
height: string;
|
||||
}
|
||||
export declare class Table extends BaseComponent<TableProps, {}> {
|
||||
render(): h.JSX.Element;
|
||||
}
|
||||
export {};
|
||||
@@ -0,0 +1,10 @@
|
||||
export type ResponseStatsRunner = {
|
||||
id: number;
|
||||
firstname: string;
|
||||
middlename: string;
|
||||
lastname: string;
|
||||
distance: number;
|
||||
donationAmount: number;
|
||||
minLaptime?: number;
|
||||
group: any;
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
import type {Primitive} from './primitive';
|
||||
|
||||
/**
|
||||
Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
|
||||
|
||||
Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
|
||||
|
||||
This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
|
||||
|
||||
@example
|
||||
```
|
||||
import type {LiteralUnion} from 'type-fest';
|
||||
|
||||
// Before
|
||||
|
||||
type Pet = 'dog' | 'cat' | string;
|
||||
|
||||
const pet: Pet = '';
|
||||
// Start typing in your TypeScript-enabled IDE.
|
||||
// You **will not** get auto-completion for `dog` and `cat` literals.
|
||||
|
||||
// After
|
||||
|
||||
type Pet2 = LiteralUnion<'dog' | 'cat', string>;
|
||||
|
||||
const pet: Pet2 = '';
|
||||
// You **will** get auto-completion for `dog` and `cat` literals.
|
||||
```
|
||||
|
||||
@category Type
|
||||
*/
|
||||
export type LiteralUnion<
|
||||
LiteralType,
|
||||
BaseType extends Primitive,
|
||||
> = LiteralType | (BaseType & Record<never, never>);
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AsapAction.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACnC,SAAS,CAAC,SAAS,EAAE,aAAa;IAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;gBAAvF,SAAS,EAAE,aAAa,EAAY,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAA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oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GAClE,UAAU,CAAC,CAAC,CAAC,CAAC;AAGjB,wBAAgB,aAAa,CAAC,aAAa,EAAE;KAAG,CAAC,IAAI,GAAG,GAAG,KAAK;CAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AACvF,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,EAC1E,aAAa,EAAE,CAAC,GACf,UAAU,CAAC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,CAAC;AAkKzD,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE,EACnC,SAAS,CAAC,EAAE,aAAa,EACzB,cAAc,GAAE,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,GAAc,gBAE7B,WAAW,GAAG,CAAC,UA0DpC"}
|
||||
@@ -0,0 +1,569 @@
|
||||
var mapping = require('./_mapping'),
|
||||
fallbackHolder = require('./placeholder');
|
||||
|
||||
/** Built-in value reference. */
|
||||
var push = Array.prototype.push;
|
||||
|
||||
/**
|
||||
* Creates a function, with an arity of `n`, that invokes `func` with the
|
||||
* arguments it receives.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {number} n The arity of the new function.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseArity(func, n) {
|
||||
return n == 2
|
||||
? function(a, b) { return func.apply(undefined, arguments); }
|
||||
: function(a) { return func.apply(undefined, arguments); };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
|
||||
* any additional arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to cap arguments for.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseAry(func, n) {
|
||||
return n == 2
|
||||
? function(a, b) { return func(a, b); }
|
||||
: function(a) { return func(a); };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `array`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the cloned array.
|
||||
*/
|
||||
function cloneArray(array) {
|
||||
var length = array ? array.length : 0,
|
||||
result = Array(length);
|
||||
|
||||
while (length--) {
|
||||
result[length] = array[length];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that clones a given object using the assignment `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The assignment function.
|
||||
* @returns {Function} Returns the new cloner function.
|
||||
*/
|
||||
function createCloner(func) {
|
||||
return function(object) {
|
||||
return func({}, object);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.spread` which flattens the spread array into
|
||||
* the arguments of the invoked `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to spread arguments over.
|
||||
* @param {number} start The start position of the spread.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function flatSpread(func, start) {
|
||||
return function() {
|
||||
var length = arguments.length,
|
||||
lastIndex = length - 1,
|
||||
args = Array(length);
|
||||
|
||||
while (length--) {
|
||||
args[length] = arguments[length];
|
||||
}
|
||||
var array = args[start],
|
||||
otherArgs = args.slice(0, start);
|
||||
|
||||
if (array) {
|
||||
push.apply(otherArgs, array);
|
||||
}
|
||||
if (start != lastIndex) {
|
||||
push.apply(otherArgs, args.slice(start + 1));
|
||||
}
|
||||
return func.apply(this, otherArgs);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and uses `cloner` to clone the first
|
||||
* argument it receives.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {Function} cloner The function to clone arguments.
|
||||
* @returns {Function} Returns the new immutable function.
|
||||
*/
|
||||
function wrapImmutable(func, cloner) {
|
||||
return function() {
|
||||
var length = arguments.length;
|
||||
if (!length) {
|
||||
return;
|
||||
}
|
||||
var args = Array(length);
|
||||
while (length--) {
|
||||
args[length] = arguments[length];
|
||||
}
|
||||
var result = args[0] = cloner.apply(undefined, args);
|
||||
func.apply(undefined, args);
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `convert` which accepts a `util` object of methods
|
||||
* required to perform conversions.
|
||||
*
|
||||
* @param {Object} util The util object.
|
||||
* @param {string} name The name of the function to convert.
|
||||
* @param {Function} func The function to convert.
|
||||
* @param {Object} [options] The options object.
|
||||
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
|
||||
* @param {boolean} [options.curry=true] Specify currying.
|
||||
* @param {boolean} [options.fixed=true] Specify fixed arity.
|
||||
* @param {boolean} [options.immutable=true] Specify immutable operations.
|
||||
* @param {boolean} [options.rearg=true] Specify rearranging arguments.
|
||||
* @returns {Function|Object} Returns the converted function or object.
|
||||
*/
|
||||
function baseConvert(util, name, func, options) {
|
||||
var isLib = typeof name == 'function',
|
||||
isObj = name === Object(name);
|
||||
|
||||
if (isObj) {
|
||||
options = func;
|
||||
func = name;
|
||||
name = undefined;
|
||||
}
|
||||
if (func == null) {
|
||||
throw new TypeError;
|
||||
}
|
||||
options || (options = {});
|
||||
|
||||
var config = {
|
||||
'cap': 'cap' in options ? options.cap : true,
|
||||
'curry': 'curry' in options ? options.curry : true,
|
||||
'fixed': 'fixed' in options ? options.fixed : true,
|
||||
'immutable': 'immutable' in options ? options.immutable : true,
|
||||
'rearg': 'rearg' in options ? options.rearg : true
|
||||
};
|
||||
|
||||
var defaultHolder = isLib ? func : fallbackHolder,
|
||||
forceCurry = ('curry' in options) && options.curry,
|
||||
forceFixed = ('fixed' in options) && options.fixed,
|
||||
forceRearg = ('rearg' in options) && options.rearg,
|
||||
pristine = isLib ? func.runInContext() : undefined;
|
||||
|
||||
var helpers = isLib ? func : {
|
||||
'ary': util.ary,
|
||||
'assign': util.assign,
|
||||
'clone': util.clone,
|
||||
'curry': util.curry,
|
||||
'forEach': util.forEach,
|
||||
'isArray': util.isArray,
|
||||
'isError': util.isError,
|
||||
'isFunction': util.isFunction,
|
||||
'isWeakMap': util.isWeakMap,
|
||||
'iteratee': util.iteratee,
|
||||
'keys': util.keys,
|
||||
'rearg': util.rearg,
|
||||
'toInteger': util.toInteger,
|
||||
'toPath': util.toPath
|
||||
};
|
||||
|
||||
var ary = helpers.ary,
|
||||
assign = helpers.assign,
|
||||
clone = helpers.clone,
|
||||
curry = helpers.curry,
|
||||
each = helpers.forEach,
|
||||
isArray = helpers.isArray,
|
||||
isError = helpers.isError,
|
||||
isFunction = helpers.isFunction,
|
||||
isWeakMap = helpers.isWeakMap,
|
||||
keys = helpers.keys,
|
||||
rearg = helpers.rearg,
|
||||
toInteger = helpers.toInteger,
|
||||
toPath = helpers.toPath;
|
||||
|
||||
var aryMethodKeys = keys(mapping.aryMethod);
|
||||
|
||||
var wrappers = {
|
||||
'castArray': function(castArray) {
|
||||
return function() {
|
||||
var value = arguments[0];
|
||||
return isArray(value)
|
||||
? castArray(cloneArray(value))
|
||||
: castArray.apply(undefined, arguments);
|
||||
};
|
||||
},
|
||||
'iteratee': function(iteratee) {
|
||||
return function() {
|
||||
var func = arguments[0],
|
||||
arity = arguments[1],
|
||||
result = iteratee(func, arity),
|
||||
length = result.length;
|
||||
|
||||
if (config.cap && typeof arity == 'number') {
|
||||
arity = arity > 2 ? (arity - 2) : 1;
|
||||
return (length && length <= arity) ? result : baseAry(result, arity);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
},
|
||||
'mixin': function(mixin) {
|
||||
return function(source) {
|
||||
var func = this;
|
||||
if (!isFunction(func)) {
|
||||
return mixin(func, Object(source));
|
||||
}
|
||||
var pairs = [];
|
||||
each(keys(source), function(key) {
|
||||
if (isFunction(source[key])) {
|
||||
pairs.push([key, func.prototype[key]]);
|
||||
}
|
||||
});
|
||||
|
||||
mixin(func, Object(source));
|
||||
|
||||
each(pairs, function(pair) {
|
||||
var value = pair[1];
|
||||
if (isFunction(value)) {
|
||||
func.prototype[pair[0]] = value;
|
||||
} else {
|
||||
delete func.prototype[pair[0]];
|
||||
}
|
||||
});
|
||||
return func;
|
||||
};
|
||||
},
|
||||
'nthArg': function(nthArg) {
|
||||
return function(n) {
|
||||
var arity = n < 0 ? 1 : (toInteger(n) + 1);
|
||||
return curry(nthArg(n), arity);
|
||||
};
|
||||
},
|
||||
'rearg': function(rearg) {
|
||||
return function(func, indexes) {
|
||||
var arity = indexes ? indexes.length : 0;
|
||||
return curry(rearg(func, indexes), arity);
|
||||
};
|
||||
},
|
||||
'runInContext': function(runInContext) {
|
||||
return function(context) {
|
||||
return baseConvert(util, runInContext(context), options);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Casts `func` to a function with an arity capped iteratee if needed.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to inspect.
|
||||
* @param {Function} func The function to inspect.
|
||||
* @returns {Function} Returns the cast function.
|
||||
*/
|
||||
function castCap(name, func) {
|
||||
if (config.cap) {
|
||||
var indexes = mapping.iterateeRearg[name];
|
||||
if (indexes) {
|
||||
return iterateeRearg(func, indexes);
|
||||
}
|
||||
var n = !isLib && mapping.iterateeAry[name];
|
||||
if (n) {
|
||||
return iterateeAry(func, n);
|
||||
}
|
||||
}
|
||||
return func;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `func` to a curried function if needed.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to inspect.
|
||||
* @param {Function} func The function to inspect.
|
||||
* @param {number} n The arity of `func`.
|
||||
* @returns {Function} Returns the cast function.
|
||||
*/
|
||||
function castCurry(name, func, n) {
|
||||
return (forceCurry || (config.curry && n > 1))
|
||||
? curry(func, n)
|
||||
: func;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `func` to a fixed arity function if needed.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to inspect.
|
||||
* @param {Function} func The function to inspect.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the cast function.
|
||||
*/
|
||||
function castFixed(name, func, n) {
|
||||
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
|
||||
var data = mapping.methodSpread[name],
|
||||
start = data && data.start;
|
||||
|
||||
return start === undefined ? ary(func, n) : flatSpread(func, start);
|
||||
}
|
||||
return func;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `func` to an rearged function if needed.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to inspect.
|
||||
* @param {Function} func The function to inspect.
|
||||
* @param {number} n The arity of `func`.
|
||||
* @returns {Function} Returns the cast function.
|
||||
*/
|
||||
function castRearg(name, func, n) {
|
||||
return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))
|
||||
? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])
|
||||
: func;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `object` by `path`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {Array|string} path The path to clone by.
|
||||
* @returns {Object} Returns the cloned object.
|
||||
*/
|
||||
function cloneByPath(object, path) {
|
||||
path = toPath(path);
|
||||
|
||||
var index = -1,
|
||||
length = path.length,
|
||||
lastIndex = length - 1,
|
||||
result = clone(Object(object)),
|
||||
nested = result;
|
||||
|
||||
while (nested != null && ++index < length) {
|
||||
var key = path[index],
|
||||
value = nested[key];
|
||||
|
||||
if (value != null &&
|
||||
!(isFunction(value) || isError(value) || isWeakMap(value))) {
|
||||
nested[key] = clone(index == lastIndex ? value : Object(value));
|
||||
}
|
||||
nested = nested[key];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
|
||||
* version with conversion `options` applied.
|
||||
*
|
||||
* @param {Object} [options] The options object. See `baseConvert` for more details.
|
||||
* @returns {Function} Returns the converted `lodash`.
|
||||
*/
|
||||
function convertLib(options) {
|
||||
return _.runInContext.convert(options)(undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a converter function for `func` of `name`.
|
||||
*
|
||||
* @param {string} name The name of the function to convert.
|
||||
* @param {Function} func The function to convert.
|
||||
* @returns {Function} Returns the new converter function.
|
||||
*/
|
||||
function createConverter(name, func) {
|
||||
var realName = mapping.aliasToReal[name] || name,
|
||||
methodName = mapping.remap[realName] || realName,
|
||||
oldOptions = options;
|
||||
|
||||
return function(options) {
|
||||
var newUtil = isLib ? pristine : helpers,
|
||||
newFunc = isLib ? pristine[methodName] : func,
|
||||
newOptions = assign(assign({}, oldOptions), options);
|
||||
|
||||
return baseConvert(newUtil, realName, newFunc, newOptions);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke its iteratee, with up to `n`
|
||||
* arguments, ignoring any additional arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to cap iteratee arguments for.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function iterateeAry(func, n) {
|
||||
return overArg(func, function(func) {
|
||||
return typeof func == 'function' ? baseAry(func, n) : func;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke its iteratee with arguments
|
||||
* arranged according to the specified `indexes` where the argument value at
|
||||
* the first index is provided as the first argument, the argument value at
|
||||
* the second index is provided as the second argument, and so on.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to rearrange iteratee arguments for.
|
||||
* @param {number[]} indexes The arranged argument indexes.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function iterateeRearg(func, indexes) {
|
||||
return overArg(func, function(func) {
|
||||
var n = indexes.length;
|
||||
return baseArity(rearg(baseAry(func, n), indexes), n);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {Function} transform The argument transform.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function overArg(func, transform) {
|
||||
return function() {
|
||||
var length = arguments.length;
|
||||
if (!length) {
|
||||
return func();
|
||||
}
|
||||
var args = Array(length);
|
||||
while (length--) {
|
||||
args[length] = arguments[length];
|
||||
}
|
||||
var index = config.rearg ? 0 : (length - 1);
|
||||
args[index] = transform(args[index]);
|
||||
return func.apply(undefined, args);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and applys the conversions
|
||||
* rules by `name`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to wrap.
|
||||
* @param {Function} func The function to wrap.
|
||||
* @returns {Function} Returns the converted function.
|
||||
*/
|
||||
function wrap(name, func, placeholder) {
|
||||
var result,
|
||||
realName = mapping.aliasToReal[name] || name,
|
||||
wrapped = func,
|
||||
wrapper = wrappers[realName];
|
||||
|
||||
if (wrapper) {
|
||||
wrapped = wrapper(func);
|
||||
}
|
||||
else if (config.immutable) {
|
||||
if (mapping.mutate.array[realName]) {
|
||||
wrapped = wrapImmutable(func, cloneArray);
|
||||
}
|
||||
else if (mapping.mutate.object[realName]) {
|
||||
wrapped = wrapImmutable(func, createCloner(func));
|
||||
}
|
||||
else if (mapping.mutate.set[realName]) {
|
||||
wrapped = wrapImmutable(func, cloneByPath);
|
||||
}
|
||||
}
|
||||
each(aryMethodKeys, function(aryKey) {
|
||||
each(mapping.aryMethod[aryKey], function(otherName) {
|
||||
if (realName == otherName) {
|
||||
var data = mapping.methodSpread[realName],
|
||||
afterRearg = data && data.afterRearg;
|
||||
|
||||
result = afterRearg
|
||||
? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)
|
||||
: castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);
|
||||
|
||||
result = castCap(realName, result);
|
||||
result = castCurry(realName, result, aryKey);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return !result;
|
||||
});
|
||||
|
||||
result || (result = wrapped);
|
||||
if (result == func) {
|
||||
result = forceCurry ? curry(result, 1) : function() {
|
||||
return func.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
result.convert = createConverter(realName, func);
|
||||
result.placeholder = func.placeholder = placeholder;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
if (!isObj) {
|
||||
return wrap(name, func, defaultHolder);
|
||||
}
|
||||
var _ = func;
|
||||
|
||||
// Convert methods by ary cap.
|
||||
var pairs = [];
|
||||
each(aryMethodKeys, function(aryKey) {
|
||||
each(mapping.aryMethod[aryKey], function(key) {
|
||||
var func = _[mapping.remap[key] || key];
|
||||
if (func) {
|
||||
pairs.push([key, wrap(key, func, _)]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Convert remaining methods.
|
||||
each(keys(_), function(key) {
|
||||
var func = _[key];
|
||||
if (typeof func == 'function') {
|
||||
var length = pairs.length;
|
||||
while (length--) {
|
||||
if (pairs[length][0] == key) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
func.convert = createConverter(key, func);
|
||||
pairs.push([key, func]);
|
||||
}
|
||||
});
|
||||
|
||||
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
|
||||
each(pairs, function(pair) {
|
||||
_[pair[0]] = pair[1];
|
||||
});
|
||||
|
||||
_.convert = convertLib;
|
||||
_.placeholder = _;
|
||||
|
||||
// Assign aliases.
|
||||
each(keys(_), function(key) {
|
||||
each(mapping.realToAlias[key] || [], function(alias) {
|
||||
_[alias] = _[key];
|
||||
});
|
||||
});
|
||||
|
||||
return _;
|
||||
}
|
||||
|
||||
module.exports = baseConvert;
|
||||
@@ -0,0 +1,177 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "createWatcher", {
|
||||
enumerable: true,
|
||||
get: ()=>createWatcher
|
||||
});
|
||||
const _chokidar = /*#__PURE__*/ _interopRequireDefault(require("chokidar"));
|
||||
const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
|
||||
const _micromatch = /*#__PURE__*/ _interopRequireDefault(require("micromatch"));
|
||||
const _normalizePath = /*#__PURE__*/ _interopRequireDefault(require("normalize-path"));
|
||||
const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
|
||||
const _utils = require("./utils");
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
function createWatcher(args, { state , rebuild }) {
|
||||
let shouldPoll = args["--poll"];
|
||||
let shouldCoalesceWriteEvents = shouldPoll || process.platform === "win32";
|
||||
// Polling interval in milliseconds
|
||||
// Used only when polling or coalescing add/change events on Windows
|
||||
let pollInterval = 10;
|
||||
let watcher = _chokidar.default.watch([], {
|
||||
// Force checking for atomic writes in all situations
|
||||
// This causes chokidar to wait up to 100ms for a file to re-added after it's been unlinked
|
||||
// This only works when watching directories though
|
||||
atomic: true,
|
||||
usePolling: shouldPoll,
|
||||
interval: shouldPoll ? pollInterval : undefined,
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish: shouldCoalesceWriteEvents ? {
|
||||
stabilityThreshold: 50,
|
||||
pollInterval: pollInterval
|
||||
} : false
|
||||
});
|
||||
// A queue of rebuilds, file reads, etc… to run
|
||||
let chain = Promise.resolve();
|
||||
/**
|
||||
* A list of files that have been changed since the last rebuild
|
||||
*
|
||||
* @type {{file: string, content: () => Promise<string>, extension: string}[]}
|
||||
*/ let changedContent = [];
|
||||
/**
|
||||
* A list of files for which a rebuild has already been queued.
|
||||
* This is used to prevent duplicate rebuilds when multiple events are fired for the same file.
|
||||
* The rebuilt file is cleared from this list when it's associated rebuild has _started_
|
||||
* This is because if the file is changed during a rebuild it won't trigger a new rebuild which it should
|
||||
**/ let pendingRebuilds = new Set();
|
||||
let _timer;
|
||||
let _reject;
|
||||
/**
|
||||
* Rebuilds the changed files and resolves when the rebuild is
|
||||
* complete regardless of whether it was successful or not
|
||||
*/ async function rebuildAndContinue() {
|
||||
let changes = changedContent.splice(0);
|
||||
// There are no changes to rebuild so we can just do nothing
|
||||
if (changes.length === 0) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
// Clear all pending rebuilds for the about-to-be-built files
|
||||
changes.forEach((change)=>pendingRebuilds.delete(change.file));
|
||||
// Resolve the promise even when the rebuild fails
|
||||
return rebuild(changes).then(()=>{}, ()=>{});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {*} file
|
||||
* @param {(() => Promise<string>) | null} content
|
||||
* @param {boolean} skipPendingCheck
|
||||
* @returns {Promise<void>}
|
||||
*/ function recordChangedFile(file, content = null, skipPendingCheck = false) {
|
||||
file = _path.default.resolve(file);
|
||||
// Applications like Vim/Neovim fire both rename and change events in succession for atomic writes
|
||||
// In that case rebuild has already been queued by rename, so can be skipped in change
|
||||
if (pendingRebuilds.has(file) && !skipPendingCheck) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
// Mark that a rebuild of this file is going to happen
|
||||
// It MUST happen synchronously before the rebuild is queued for this to be effective
|
||||
pendingRebuilds.add(file);
|
||||
changedContent.push({
|
||||
file,
|
||||
content: content !== null && content !== void 0 ? content : ()=>_fs.default.promises.readFile(file, "utf8"),
|
||||
extension: _path.default.extname(file).slice(1)
|
||||
});
|
||||
if (_timer) {
|
||||
clearTimeout(_timer);
|
||||
_reject();
|
||||
}
|
||||
// If a rebuild is already in progress we don't want to start another one until the 10ms timer has expired
|
||||
chain = chain.then(()=>new Promise((resolve, reject)=>{
|
||||
_timer = setTimeout(resolve, 10);
|
||||
_reject = reject;
|
||||
}));
|
||||
// Resolves once this file has been rebuilt (or the rebuild for this file has failed)
|
||||
// This queues as many rebuilds as there are changed files
|
||||
// But those rebuilds happen after some delay
|
||||
// And will immediately resolve if there are no changes
|
||||
chain = chain.then(rebuildAndContinue, rebuildAndContinue);
|
||||
return chain;
|
||||
}
|
||||
watcher.on("change", (file)=>recordChangedFile(file));
|
||||
watcher.on("add", (file)=>recordChangedFile(file));
|
||||
// Restore watching any files that are "removed"
|
||||
// This can happen when a file is pseudo-atomically replaced (a copy is created, overwritten, the old one is unlinked, and the new one is renamed)
|
||||
// TODO: An an optimization we should allow removal when the config changes
|
||||
watcher.on("unlink", (file)=>{
|
||||
file = (0, _normalizePath.default)(file);
|
||||
// Only re-add the file if it's not covered by a dynamic pattern
|
||||
if (!_micromatch.default.some([
|
||||
file
|
||||
], state.contentPatterns.dynamic)) {
|
||||
watcher.add(file);
|
||||
}
|
||||
});
|
||||
// Some applications such as Visual Studio (but not VS Code)
|
||||
// will only fire a rename event for atomic writes and not a change event
|
||||
// This is very likely a chokidar bug but it's one we need to work around
|
||||
// We treat this as a change event and rebuild the CSS
|
||||
watcher.on("raw", (evt, filePath, meta)=>{
|
||||
if (evt !== "rename") {
|
||||
return;
|
||||
}
|
||||
let watchedPath = meta.watchedPath;
|
||||
// Watched path might be the file itself
|
||||
// Or the directory it is in
|
||||
filePath = watchedPath.endsWith(filePath) ? watchedPath : _path.default.join(watchedPath, filePath);
|
||||
// Skip this event since the files it is for does not match any of the registered content globs
|
||||
if (!_micromatch.default.some([
|
||||
filePath
|
||||
], state.contentPatterns.all)) {
|
||||
return;
|
||||
}
|
||||
// Skip since we've already queued a rebuild for this file that hasn't happened yet
|
||||
if (pendingRebuilds.has(filePath)) {
|
||||
return;
|
||||
}
|
||||
// We'll go ahead and add the file to the pending rebuilds list here
|
||||
// It'll be removed when the rebuild starts unless the read fails
|
||||
// which will be taken care of as well
|
||||
pendingRebuilds.add(filePath);
|
||||
async function enqueue() {
|
||||
try {
|
||||
// We need to read the file as early as possible outside of the chain
|
||||
// because it may be gone by the time we get to it. doing the read
|
||||
// immediately increases the chance that the file is still there
|
||||
let content = await (0, _utils.readFileWithRetries)(_path.default.resolve(filePath));
|
||||
if (content === undefined) {
|
||||
return;
|
||||
}
|
||||
// This will push the rebuild onto the chain
|
||||
// We MUST skip the rebuild check here otherwise the rebuild will never happen on Linux
|
||||
// This is because the order of events and timing is different on Linux
|
||||
// @ts-ignore: TypeScript isn't picking up that content is a string here
|
||||
await recordChangedFile(filePath, ()=>content, true);
|
||||
} catch {
|
||||
// If reading the file fails, it's was probably a deleted temporary file
|
||||
// So we can ignore it and no rebuild is needed
|
||||
}
|
||||
}
|
||||
enqueue().then(()=>{
|
||||
// If the file read fails we still need to make sure the file isn't stuck in the pending rebuilds list
|
||||
pendingRebuilds.delete(filePath);
|
||||
});
|
||||
});
|
||||
return {
|
||||
fswatcher: watcher,
|
||||
refreshWatchedFiles () {
|
||||
watcher.add(Array.from(state.contextDependencies));
|
||||
watcher.add(Array.from(state.configDependencies));
|
||||
watcher.add(state.contentPatterns.all);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isReadableStreamLike.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAiB,kCAAkC,CAAI,cAAqC;;;;;;oBAC1F,MAAM,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;;;;;;yBAEjC,IAAI;oBACe,mBAAM,MAAM,CAAC,IAAI,EAAE,GAAA;;oBAArC,KAAkB,SAAmB,EAAnC,KAAK,WAAA,EAAE,IAAI,UAAA;yBACf,IAAI,EAAJ,cAAI;;wBACN,sBAAO;2CAEH,KAAM;wBAAZ,sBAAY;;oBAAZ,SAAY,CAAC;;;;oBAGf,MAAM,CAAC,WAAW,EAAE,CAAC;;;;;;CAExB;AAED,MAAM,UAAU,oBAAoB,CAAI,GAAQ;IAG9C,OAAO,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAC,CAAC;AACpC,CAAC"}
|
||||
@@ -0,0 +1,205 @@
|
||||
/**
|
||||
* This extension allows you to record a sequence using Mousetrap.
|
||||
*
|
||||
* @author Dan Tao <daniel.tao@gmail.com>
|
||||
*/
|
||||
(function(Mousetrap) {
|
||||
/**
|
||||
* the sequence currently being recorded
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
var _recordedSequence = [],
|
||||
|
||||
/**
|
||||
* a callback to invoke after recording a sequence
|
||||
*
|
||||
* @type {Function|null}
|
||||
*/
|
||||
_recordedSequenceCallback = null,
|
||||
|
||||
/**
|
||||
* a list of all of the keys currently held down
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
_currentRecordedKeys = [],
|
||||
|
||||
/**
|
||||
* temporary state where we remember if we've already captured a
|
||||
* character key in the current combo
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
_recordedCharacterKey = false,
|
||||
|
||||
/**
|
||||
* a handle for the timer of the current recording
|
||||
*
|
||||
* @type {null|number}
|
||||
*/
|
||||
_recordTimer = null,
|
||||
|
||||
/**
|
||||
* the original handleKey method to override when Mousetrap.record() is
|
||||
* called
|
||||
*
|
||||
* @type {Function}
|
||||
*/
|
||||
_origHandleKey = Mousetrap.prototype.handleKey;
|
||||
|
||||
/**
|
||||
* handles a character key event
|
||||
*
|
||||
* @param {string} character
|
||||
* @param {Array} modifiers
|
||||
* @param {Event} e
|
||||
* @returns void
|
||||
*/
|
||||
function _handleKey(character, modifiers, e) {
|
||||
var self = this;
|
||||
|
||||
if (!self.recording) {
|
||||
_origHandleKey.apply(self, arguments);
|
||||
return;
|
||||
}
|
||||
|
||||
// remember this character if we're currently recording a sequence
|
||||
if (e.type == 'keydown') {
|
||||
if (character.length === 1 && _recordedCharacterKey) {
|
||||
_recordCurrentCombo();
|
||||
}
|
||||
|
||||
for (i = 0; i < modifiers.length; ++i) {
|
||||
_recordKey(modifiers[i]);
|
||||
}
|
||||
_recordKey(character);
|
||||
|
||||
// once a key is released, all keys that were held down at the time
|
||||
// count as a keypress
|
||||
} else if (e.type == 'keyup' && _currentRecordedKeys.length > 0) {
|
||||
_recordCurrentCombo();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* marks a character key as held down while recording a sequence
|
||||
*
|
||||
* @param {string} key
|
||||
* @returns void
|
||||
*/
|
||||
function _recordKey(key) {
|
||||
var i;
|
||||
|
||||
// one-off implementation of Array.indexOf, since IE6-9 don't support it
|
||||
for (i = 0; i < _currentRecordedKeys.length; ++i) {
|
||||
if (_currentRecordedKeys[i] === key) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_currentRecordedKeys.push(key);
|
||||
|
||||
if (key.length === 1) {
|
||||
_recordedCharacterKey = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* marks whatever key combination that's been recorded so far as finished
|
||||
* and gets ready for the next combo
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
function _recordCurrentCombo() {
|
||||
_recordedSequence.push(_currentRecordedKeys);
|
||||
_currentRecordedKeys = [];
|
||||
_recordedCharacterKey = false;
|
||||
_restartRecordTimer();
|
||||
}
|
||||
|
||||
/**
|
||||
* ensures each combo in a sequence is in a predictable order and formats
|
||||
* key combos to be '+'-delimited
|
||||
*
|
||||
* modifies the sequence in-place
|
||||
*
|
||||
* @param {Array} sequence
|
||||
* @returns void
|
||||
*/
|
||||
function _normalizeSequence(sequence) {
|
||||
var i;
|
||||
|
||||
for (i = 0; i < sequence.length; ++i) {
|
||||
sequence[i].sort(function(x, y) {
|
||||
// modifier keys always come first, in alphabetical order
|
||||
if (x.length > 1 && y.length === 1) {
|
||||
return -1;
|
||||
} else if (x.length === 1 && y.length > 1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// character keys come next (list should contain no duplicates,
|
||||
// so no need for equality check)
|
||||
return x > y ? 1 : -1;
|
||||
});
|
||||
|
||||
sequence[i] = sequence[i].join('+');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* finishes the current recording, passes the recorded sequence to the stored
|
||||
* callback, and sets Mousetrap.handleKey back to its original function
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
function _finishRecording() {
|
||||
if (_recordedSequenceCallback) {
|
||||
_normalizeSequence(_recordedSequence);
|
||||
_recordedSequenceCallback(_recordedSequence);
|
||||
}
|
||||
|
||||
// reset all recorded state
|
||||
_recordedSequence = [];
|
||||
_recordedSequenceCallback = null;
|
||||
_currentRecordedKeys = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* called to set a 1 second timeout on the current recording
|
||||
*
|
||||
* this is so after each key press in the sequence the recording will wait for
|
||||
* 1 more second before executing the callback
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
function _restartRecordTimer() {
|
||||
clearTimeout(_recordTimer);
|
||||
_recordTimer = setTimeout(_finishRecording, 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
* records the next sequence and passes it to a callback once it's
|
||||
* completed
|
||||
*
|
||||
* @param {Function} callback
|
||||
* @returns void
|
||||
*/
|
||||
Mousetrap.prototype.record = function(callback) {
|
||||
var self = this;
|
||||
self.recording = true;
|
||||
_recordedSequenceCallback = function() {
|
||||
self.recording = false;
|
||||
callback.apply(self, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
Mousetrap.prototype.handleKey = function() {
|
||||
var self = this;
|
||||
_handleKey.apply(self, arguments);
|
||||
};
|
||||
|
||||
Mousetrap.init();
|
||||
|
||||
})(Mousetrap);
|
||||
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
const isStream = stream =>
|
||||
stream !== null &&
|
||||
typeof stream === 'object' &&
|
||||
typeof stream.pipe === 'function';
|
||||
|
||||
isStream.writable = stream =>
|
||||
isStream(stream) &&
|
||||
stream.writable !== false &&
|
||||
typeof stream._write === 'function' &&
|
||||
typeof stream._writableState === 'object';
|
||||
|
||||
isStream.readable = stream =>
|
||||
isStream(stream) &&
|
||||
stream.readable !== false &&
|
||||
typeof stream._read === 'function' &&
|
||||
typeof stream._readableState === 'object';
|
||||
|
||||
isStream.duplex = stream =>
|
||||
isStream.writable(stream) &&
|
||||
isStream.readable(stream);
|
||||
|
||||
isStream.transform = stream =>
|
||||
isStream.duplex(stream) &&
|
||||
typeof stream._transform === 'function';
|
||||
|
||||
module.exports = isStream;
|
||||
Reference in New Issue
Block a user