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

@psdk/frame-father

Package Overview
Dependencies
Maintainers
0
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@psdk/frame-father - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

build/toolkit/gbk.d.ts

33

build/father/command/print/command.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -34,3 +11,2 @@ exports.DefaultCommand = exports.BasicCommand = void 0;

const toolkit_1 = require("../../../toolkit");
const iconv = __importStar(require("iconv-lite"));
class BasicCommand {

@@ -52,3 +28,4 @@ base64() {

//# use gbk encoding
const t_buffer = iconv.encode(t, clause.charset ?? types_1.PsdkConst.DEF_CHARSET);
// const t_buffer = iconv.encode(t, clause.charset ?? PsdkConst.DEF_CHARSET);
const t_buffer = toolkit_1.FastGBK.encode(t);
const t_binary = Array.prototype.slice.call(t_buffer, 0);

@@ -77,7 +54,9 @@ bytes = bytes.concat(t_binary);

string(charset) {
const buffer = Array.from(this.binary());
// const buffer = Array.from(this.binary());
// @ts-ignore
return iconv.decode(buffer, charset ?? types_1.PsdkConst.DEF_CHARSET);
// return iconv.decode(buffer, charset ?? PsdkConst.DEF_CHARSET);
// return gbkDecoder.decode(this.binary());
return toolkit_1.FastGBK.decode(this.binary());
}
}
exports.DefaultCommand = DefaultCommand;
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BinaryCommand = void 0;
/**
* Binary command
*/
const types_1 = require("../../types");
const iconv = __importStar(require("iconv-lite"));
const command_clause_1 = require("../print/command_clause");
// import * as iconv from 'iconv-lite';
const toolkit_1 = require("../../../toolkit");
class BinaryCommand {

@@ -50,4 +24,5 @@ binary;

appendText(text, charset) {
const encoding = (charset ?? types_1.PsdkConst.DEF_CHARSET).toLowerCase();
const binary = iconv.encode(text, encoding);
// const encoding = (charset ?? PsdkConst.DEF_CHARSET).toLowerCase();
// const binary = iconv.encode(text, encoding);
const binary = toolkit_1.FastGBK.encode(text);
this.binary.push(...binary);

@@ -54,0 +29,0 @@ return this;

@@ -6,2 +6,3 @@ export * from './byte';

export * from './checker';
export * from './gbk';
//# sourceMappingURL=index.d.ts.map

@@ -22,1 +22,2 @@ "use strict";

__exportStar(require("./checker"), exports);
__exportStar(require("./gbk"), exports);
{
"name": "@psdk/frame-father",
"version": "0.4.0",
"version": "0.5.0",
"description": "psdk",

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

"dependencies": {
"iconv-lite": "^0.6.3",
"js-base64": "^3.7.7"

@@ -34,3 +33,3 @@ },

],
"gitHead": "13fa8cc6aacbf8f6bacb5f485da11a7610001f61"
"gitHead": "0de75b4e37274d7a68a04aa34501fa3297769185"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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