
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
workdesk-common-module
Advanced tools
npm install --save ../common-module
import { isEmptyObject } from "common-module/util"; console.log(isEmptyObject({}));
import { Logger } from "common-module/util/logger"; Logger.info("This is my info", null, true);
import { Bcrypt } from "common-module/util/bcrypt"; console.log(Bcrypt.createHash("sanjay"));
import { Jwt } from "common-module/util/jwt"; console.log(Jwt.createToken({ id: 11 }));
import { Crypto } from "common-module/util/crypto"; const d1 = Crypto.encrypt("sanjay"); console.log(d1); const d2 = Crypto.decrypt(d1); console.log(d2);
import { sendMail, MailArg } from "common-module/util/mail"; let mailData = new MailArg( "sanjay.mscit7@gmail.com", "Test mail", "test by sanjay" ); sendMail(mailData, function (error, info) { if (error) { console.error(error); } if (info) console.log("Mail email sent successfully, messageId => ", info.messageId); });
import { DeviceType, NotificationBodyArg, sendPushNotification, } from "common-module/util/notification"; let notificationData = new NotificationBodyArg( "Test notification", "test by sanjay", 1, "profile", { name: "sanjay" }, 2 ); sendPushNotification( "qwertyuiopasdfghjklzxcvbnm", DeviceType.IOS, notificationData, function (error, info) { if (error) { console.error(error); } if (info) { console.log("Notification sent successfully, messageId => "); console.log(info); } } );
import { sendSms } from "common-module/util/sms"; sendSms("+917778899848", "this is test", function (error, info) { if (error) { console.log("error => ", error); } if (info) { console.log("info => ", info); } });
import apiAuthMiddleware from "common-module/middleware/api-auth"; import decryptRequestMiddleware from "common-module/middleware/decrypt-request"; import encryptResponseMiddleware from "common-module/middleware/encrypt-response";
app.use(apiAuthMiddleware); app.use(encryptResponseMiddleware); app.use(decryptRequestMiddleware);
import {encryptErrorHandler,errorHandler,InternalServerError} from "common-module/handler/error-handler";
import {HttpResponse} from "common-module/response/http-response";
import { EncryptHttpResponse } from "common-module/response/encrypt-http-response";
FAQs
npm install --save ../common-module
The npm package workdesk-common-module receives a total of 0 weekly downloads. As such, workdesk-common-module popularity was classified as not popular.
We found that workdesk-common-module demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.