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

onemapsg

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onemapsg - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

2

dist/OneMap.js

@@ -59,4 +59,4 @@ "use strict";

}
exports.OneMap = OneMap;
_OneMap_token = new WeakMap();
OneMap.BASE_URL = 'https://www.onemap.gov.sg/api';
exports.OneMap = OneMap;

@@ -19,4 +19,4 @@ import { OneMap } from '../OneMap';

export interface GetPlanningareaReq {
lat: number;
lng: number;
latitude: number;
longitude: number;
year: number;

@@ -23,0 +23,0 @@ }

@@ -32,9 +32,9 @@ "use strict";

async fetch(endpoint, query) {
if (__classPrivateFieldGet(this, _Service_auth, "f")) {
query.token = await this.onemap.getAccessToken();
}
const uri = __classPrivateFieldGet(this, _Service_instances, "m", _Service_getUri).call(this, endpoint, query);
const response = await (0, axios_1.default)(uri, {
proxy: this.onemap.options?.proxy,
method: 'GET'
method: 'GET',
headers: __classPrivateFieldGet(this, _Service_auth, "f") ? {
'Authorization': `Bearer ${await this.onemap.getAccessToken()}`
} : undefined
});

@@ -41,0 +41,0 @@ return response.data;

{
"name": "onemapsg",
"version": "2.0.0",
"version": "2.1.0",
"author": "Chang Zhe Jiet",

@@ -33,17 +33,17 @@ "description": "Helper library for using OneMap APIs.",

"dependencies": {
"axios": "^0.26.1",
"dayjs": "^1.11.7"
"axios": "^1.6.2",
"dayjs": "^1.11.10"
},
"devDependencies": {
"@types/jest": "^29.5.0",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"eslint": "^8.36.0",
"eslint-plugin-import": "^2.27.5",
"@types/jest": "^29.5.10",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"eslint": "^8.54.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-security": "^1.7.1",
"jest": "^29.5.0",
"ts-jest": "^29.0.5",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.0.2"
"typescript": "^5.3.2"
}
}
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