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.0.0 to 2.0.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,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=7)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.uint8=0]="uint8",t[t.uint16=1]="uint16",t[t.uint32=2]="uint32",t[t.float32=3]="float32",t[t.float64=4]="float64"}(e.DataType||(e.DataType={})),e.card=function(t,e,r,n){var o=t[e];if(void 0==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){t.exports=function(){return new Worker(r.p+"4c54190d322a6fd1bd92.worker.js")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2),o=r(1),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 i=r.setupWorker(),a=++r.requestId,u={requestId:a,fileContent:t,hduDecodeOptions:e};r.callbacks.set(a,{resolve:n,reject:o}),i.postMessage(u)})},t.prototype.setupWorker=function(){var t=this;return this.worker?this.worker:(this.worker=new n,this.worker.addEventListener("message",function(e){var r=e.data,n=t.callbacks.get(r.requestId),i=n.resolve,a=n.reject;r.error?a(r.error):i(r.hduSources.map(o.Hdu.fromSource)),t.callbacks.delete(r.requestId)}),this.worker)},t.prototype.close=function(){this.worker.terminate()},t}();e.Decoder=i},function(t,e,r){"use strict";var n,o=this&&this.__extends||(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])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,u)}c((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=r(3),c=r(0),s=function(t){function e(){return t.call(this)||this}return o(e,t),e.decode=function(t,e){return i(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return this.decoder||(this.decoder=new u.Decoder),[4,this.decoder.decode(t,e)];case 1:return[2,r.sent()]}})})},e.fetch=function(t,e){return i(this,void 0,void 0,function(){var r;return a(this,function(n){switch(n.label){case 0:return r=this.decode,[4,function(t){return new Promise(function(e,r){var n=new XMLHttpRequest;n.open("GET",t),n.onload=function(){return e(n.response)},n.onerror=function(t){return r(t)},n.responseType="arraybuffer",n.send()})}(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=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4);e.Fits=n.Fits;var o=r(1);e.Hdu=o.Hdu},function(t,e){t.exports=require("es6-promise/auto")},function(t,e,r){r(6),t.exports=r(5)}]));
!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,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=7)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.uint8=0]="uint8",t[t.uint16=1]="uint16",t[t.uint32=2]="uint32",t[t.float32=3]="float32",t[t.float64=4]="float64"}(e.DataType||(e.DataType={})),e.card=function(t,e,r,n){var o=t[e];if(void 0==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){t.exports=function(){return new Worker(r.p+"4c54190d322a6fd1bd92.worker.js")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2),o=r(1),a=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 a=r.setupWorker(),i=++r.requestId,u={requestId:i,fileContent:t,hduDecodeOptions:e};r.callbacks.set(i,{resolve:n,reject:o}),a.postMessage(u)})},t.prototype.setupWorker=function(){var t=this;return this.worker?this.worker:(this.worker=new n,this.worker.addEventListener("message",function(e){var r=e.data,n=t.callbacks.get(r.requestId),a=n.resolve,i=n.reject;r.error?i(r.error):a(r.hduSources.map(o.Hdu.fromSource)),t.callbacks.delete(r.requestId)}),this.worker)},t.prototype.close=function(){this.worker.terminate()},t}();e.Decoder=a},function(t,e,r){"use strict";var n,o=this&&this.__extends||(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])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,a){function i(t){try{s(n.next(t))}catch(t){a(t)}}function u(t){try{s(n.throw(t))}catch(t){a(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(i,u)}s((n=n.apply(t,e||[])).next())})},i=this&&this.__generator||function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=n[2&a[0]?"return":a[0]?"throw":"next"])&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[0,o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=r(3),s=r(0),c=function(t){function e(){return t.call(this)||this}return o(e,t),e.decode=function(t,e){return a(this,void 0,void 0,function(){return i(this,function(r){switch(r.label){case 0:return this.decoder||(this.decoder=new u.Decoder),[4,this.decoder.decode(t,e)];case 1:return[2,r.sent()]}})})},e.fetch=function(t,e){return a(this,void 0,void 0,function(){var r;return i(this,function(n){switch(n.label){case 0:return r=this.decode,[4,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()})}(t)];case 1:return[4,r.apply(this,[n.sent(),e])];case 2:return[2,n.sent()]}})})},e.DataType=s.DataType,e}(Array);e.Fits=c},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4);e.Fits=n.Fits;var o=r(1);e.Hdu=o.Hdu},function(t,e){t.exports=require("es6-promise/auto")},function(t,e,r){r(6),t.exports=r(5)}]));
{
"name": "@hscmap/fits",
"version": "2.0.0",
"version": "2.0.2",
"description": "fits (Flexible Image Transport System) reader module",

@@ -25,2 +25,3 @@ "main": "build/dist/index.js",

"file-loader": "^1.1.11",
"gh-pages": "^1.1.0",
"html-webpack-plugin": "^3.2.0",

@@ -27,0 +28,0 @@ "ts-loader": "^4.2.0",

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