Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hscmap/fits

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hscmap/fits - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

2

build/dist/index.js

@@ -1,1 +0,1 @@

!function(t,e){for(var r in e)t[r]=e[r]}(exports,function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.uint8=8]="uint8",t[t.uint16=16]="uint16",t[t.uint32=32]="uint32",t[t.float32=-32]="float32",t[t.float64=-64]="float64"}(e.DataType||(e.DataType={})),e.card=function(t,e,r,n){var o=t[e];if(null==o&&(o=n),typeof o!=r)throw new Error("Type mismatch: "+o+" for "+e);return o}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(){function t(t,e,r){this.header=t,this.data=e,this.dataType=r}return t.fromSource=function(e){return new t(e.header,e.data,e.dataType)},t.prototype.card=function(t,e){return n.card(this.header,t,e)},t.prototype.uint8array=function(){return this.typedArray(n.DataType.uint8,Uint8Array)},t.prototype.uint16array=function(){return this.typedArray(n.DataType.uint16,Uint16Array)},t.prototype.uint32array=function(){return this.typedArray(n.DataType.uint32,Uint32Array)},t.prototype.float32array=function(){return this.typedArray(n.DataType.float32,Float32Array)},t.prototype.float64array=function(){return this.typedArray(n.DataType.float64,Float64Array)},t.prototype.typedArray=function(t,e){if(this.dataType!=t)throw new Error("type mismatch: "+n.DataType[this.dataType]+" -> "+n.DataType[t]);return new e(this.data)},t}();e.Hdu=o},function(t,e,r){r(3),t.exports=r(4)},function(t,e){t.exports=require("es6-promise/auto")},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(5);e.Fits=n.Fits;var o=r(1);e.Hdu=o.Hdu},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,u){function a(t){try{c(n.next(t))}catch(t){u(t)}}function i(t){try{c(n.throw(t))}catch(t){u(t)}}function c(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,i)}c((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var r,n,o,u,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function i(u){return function(i){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,i])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(6),c=r(0),s=r(7),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.decode=function(t,e){return u(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return[4,s.decode(t,e)];case 1:return[2,r.sent()]}})})},e.fetch=function(t,e){return u(this,void 0,void 0,function(){var r;return a(this,function(n){switch(n.label){case 0:return r=this.decode,[4,i.ajax(t)];case 1:return[4,r.apply(this,[n.sent(),e])];case 2:return[2,n.sent()]}})})},e.DataType=c.DataType,e}(Array);e.Fits=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ajax=function(t){return new Promise(function(e,r){var n=new XMLHttpRequest;n.open("GET",t),n.addEventListener("load",function(){200==n.status?e(n.response):r("status="+n.status)}),n.addEventListener("error",function(t){return r(t)}),n.responseType="arraybuffer",n.send()})}},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,u){function a(t){try{c(n.next(t))}catch(t){u(t)}}function i(t){try{c(n.throw(t))}catch(t){u(t)}}function c(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,i)}c((n=n.apply(t,e||[])).next())})},o=this&&this.__generator||function(t,e){var r,n,o,u,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function i(u){return function(i){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,i])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=r(1),a=r(8),i=function(){function t(){this.requestId=0,this.callbacks=new Map}return t.prototype.decode=function(t,e){var r=this;return new Promise(function(n,o){var u=r.setupWorker(),a=++r.requestId,i={requestId:a,fileContent:t,hduDecodeOptions:e};r.callbacks.set(a,{resolve:n,reject:o}),u.postMessage(i)})},t.prototype.setupWorker=function(){var t=this;return this.worker?this.worker:(this.worker=new a,this.worker.addEventListener("message",function(e){var r=e.data,n=t.callbacks.get(r.requestId),o=n.resolve,a=n.reject;r.error?a(r.error):o(r.hduSources.map(u.Hdu.fromSource)),t.callbacks.delete(r.requestId)}),this.worker)},t}();e.decode=function(t,e){return n(this,void 0,void 0,function(){var r,n,u;return o(this,function(o){switch(o.label){case 0:return r=i.singleton=i.singleton||new i,n=performance.now(),console.log("decode start"),[4,r.decode(t,e)];case 1:return u=o.sent(),console.log(performance.now()-n),[2,u]}})})}},function(t,e,r){t.exports=function(){return new Worker(r.p+"794069db94ece13b978c.worker.js")}}]));
!function(t,e){for(var r in e)t[r]=e[r]}(exports,function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.uint8=8]="uint8",t[t.uint16=16]="uint16",t[t.uint32=32]="uint32",t[t.float32=-32]="float32",t[t.float64=-64]="float64"}(e.DataType||(e.DataType={})),e.card=function(t,e,r,n){var o=t[e];if(null==o&&(o=n),typeof o!=r)throw new Error("Type mismatch: "+o+" for "+e);return o}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(){function t(t,e,r){this.header=t,this.data=e,this.dataType=r}return t.fromSource=function(e){return new t(e.header,e.data,e.dataType)},t.prototype.card=function(t,e){return n.card(this.header,t,e)},t.prototype.uint8array=function(){return this.typedArray(n.DataType.uint8,Uint8Array)},t.prototype.uint16array=function(){return this.typedArray(n.DataType.uint16,Uint16Array)},t.prototype.uint32array=function(){return this.typedArray(n.DataType.uint32,Uint32Array)},t.prototype.float32array=function(){return this.typedArray(n.DataType.float32,Float32Array)},t.prototype.float64array=function(){return this.typedArray(n.DataType.float64,Float64Array)},t.prototype.typedArray=function(t,e){if(this.dataType!=t)throw new Error("type mismatch: "+n.DataType[this.dataType]+" -> "+n.DataType[t]);return new e(this.data)},t}();e.Hdu=o},function(t,e,r){r(3),t.exports=r(4)},function(t,e){t.exports=require("es6-promise/auto")},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(5);e.Fits=n.Fits;var o=r(1);e.Hdu=o.Hdu},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,u){function a(t){try{c(n.next(t))}catch(t){u(t)}}function i(t){try{c(n.throw(t))}catch(t){u(t)}}function c(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,i)}c((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var r,n,o,u,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function i(u){return function(i){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,i])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(6),c=r(0),s=r(7),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.decode=function(t,e){return u(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return[4,s.decode(t,e)];case 1:return[2,r.sent()]}})})},e.fetch=function(t,e){return u(this,void 0,void 0,function(){var r;return a(this,function(n){switch(n.label){case 0:return r=this.decode,[4,i.ajax(t)];case 1:return[4,r.apply(this,[n.sent(),e])];case 2:return[2,n.sent()]}})})},e.DataType=c.DataType,e}(Array);e.Fits=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ajax=function(t){return new Promise(function(e,r){var n=new XMLHttpRequest;n.open("GET",t),n.addEventListener("load",function(){200==n.status?e(n.response):r("status="+n.status)}),n.addEventListener("error",function(t){return r(t)}),n.responseType="arraybuffer",n.send()})}},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,u){function a(t){try{c(n.next(t))}catch(t){u(t)}}function i(t){try{c(n.throw(t))}catch(t){u(t)}}function c(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,i)}c((n=n.apply(t,e||[])).next())})},o=this&&this.__generator||function(t,e){var r,n,o,u,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function i(u){return function(i){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,i])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=r(1),a=r(8),i=function(){function t(){this.requestId=0,this.callbacks=new Map}return t.prototype.decode=function(t,e){var r=this;return new Promise(function(n,o){var u=r.setupWorker(),a=++r.requestId,i={requestId:a,fileContent:t,hduDecodeOptions:e};r.callbacks.set(a,{resolve:n,reject:o}),u.postMessage(i)})},t.prototype.setupWorker=function(){var t=this;return this.worker?this.worker:(this.worker=new a,this.worker.addEventListener("message",function(e){var r=e.data,n=t.callbacks.get(r.requestId),o=n.resolve,a=n.reject;r.error?a(r.error):o(r.hduSources.map(u.Hdu.fromSource)),t.callbacks.delete(r.requestId)}),this.worker)},t}();e.decode=function(t,e){return n(this,void 0,void 0,function(){var r;return o(this,function(n){switch(n.label){case 0:return r=i.singleton=i.singleton||new i,performance.now(),[4,r.decode(t,e)];case 1:return[2,n.sent()]}})})}},function(t,e,r){t.exports=function(){return new Worker(r.p+"794069db94ece13b978c.worker.js")}}]));
{
"name": "@hscmap/fits",
"version": "2.1.1",
"version": "2.1.2",
"description": "fits (Flexible Image Transport System) reader module",

@@ -5,0 +5,0 @@ "main": "build/dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc