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.2 to 2.0.3

build/dist/4c4e5307b2b59654ca71.worker.js

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),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)}]));
!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});var n=r(1),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){"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){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(0);e.Hdu=o.Hdu},function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return(t=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])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,u){function i(t){try{c(n.next(t))}catch(t){u(t)}}function a(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(i,a)}c((n=n.apply(t,e||[])).next())})},u=this&&this.__generator||function(t,e){var r,n,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i;)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 i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}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,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(6),a=r(1),c=function(t){function e(){return t.call(this)||this}return n(e,t),e.decode=function(t,e){return o(this,void 0,void 0,function(){return u(this,function(r){switch(r.label){case 0:return this.decoder||(this.decoder=new i.Decoder),[4,this.decoder.decode(t,e)];case 1:return[2,r.sent()]}})})},e.fetch=function(t,e){return o(this,void 0,void 0,function(){var r;return u(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=a.DataType,e}(Array);e.Fits=c},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7),o=r(0),u=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(),i=++r.requestId,a={requestId:i,fileContent:t,hduDecodeOptions:e};r.callbacks.set(i,{resolve:n,reject:o}),u.postMessage(a)})},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),u=n.resolve,i=n.reject;r.error?i(r.error):u(r.hduSources.map(o.Hdu.fromSource)),t.callbacks.delete(r.requestId)}),this.worker)},t.prototype.close=function(){this.worker.terminate()},t}();e.Decoder=u},function(t,e,r){t.exports=function(){return new Worker(r.p+"4c4e5307b2b59654ca71.worker.js")}}]));

@@ -6,3 +6,3 @@ export declare enum DataType {

float32 = 3,
float64 = 4,
float64 = 4
}

@@ -9,0 +9,0 @@ export declare type HduDecodeOption = {

@@ -8,4 +8,4 @@ import { HduDecodeOption } from "./common";

decode(fileContent: ArrayBuffer, hduDecodeOptions?: Partial<HduDecodeOption>[]): Promise<Hdu[]>;
private setupWorker();
private setupWorker;
close(): void;
}

@@ -14,3 +14,3 @@ import { Header, HduSource, CardTypes, DataType } from "./common";

float64array(): Float64Array;
private typedArray<T>(dataType, ctr);
private typedArray;
}
{
"name": "@hscmap/fits",
"version": "2.0.2",
"version": "2.0.3",
"description": "fits (Flexible Image Transport System) reader module",

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

"scripts": {
"prepublish": "webpack --config ./build/webpack.config.js --context build --mode production",
"prepare": "webpack --config ./build/webpack.config.js --context build --mode production",
"example": "webpack --config ./example/webpack.config.js --context example --mode production",

@@ -14,2 +14,5 @@ "example-server": "webpack-dev-server --config ./example/webpack.config.js --context example --mode development",

},
"files": [
"build/dist"
],
"keywords": [

@@ -26,13 +29,14 @@ "fits",

"devDependencies": {
"file-loader": "^1.1.11",
"gh-pages": "^1.1.0",
"file-loader": "^2.0.0",
"gh-pages": "^1.2.0",
"html-webpack-plugin": "^3.2.0",
"ts-loader": "^4.2.0",
"typescript": "^2.8.3",
"webpack": "^4.6.0",
"webpack-cli": "^2.0.15",
"webpack-dev-server": "^3.1.3",
"worker-loader": "^1.1.1"
"ts-loader": "^4.5.0",
"typescript": "^3.0.3",
"webpack": "^4.17.1",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.7",
"webpack-node-externals": "^1.7.2",
"worker-loader": "^2.0.0"
},
"repository": "github:michitaro/fits"
}
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