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

@abcnews/base-36-text

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abcnews/base-36-text - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/index.js.map

7

dist/index.d.ts

@@ -1,3 +0,4 @@

import 'fast-text-encoding';
export declare function encode(text: string): string;
export declare function decode(base36string: string): string;
declare function encode(text: string): string;
declare function decode(base36string: string): string;
export { decode, encode };

@@ -0,8 +1,49 @@

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./base-36-text.cjs.production.min.js')
} else {
module.exports = require('./base-36-text.cjs.development.js')
// src/index.ts
var src_exports = {};
__export(src_exports, {
decode: () => decode,
encode: () => encode
});
module.exports = __toCommonJS(src_exports);
var import_base_x = __toESM(require("base-x"));
var BASE_36_CHARSET = "0123456789abcdefghijklmnopqrstuvwxyz";
var base36 = (0, import_base_x.default)(BASE_36_CHARSET);
var encoder = new TextEncoder();
var decoder = new TextDecoder();
function encode(text) {
return base36.encode(encoder.encode(text));
}
function decode(base36string) {
return decoder.decode(base36.decode(base36string));
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
decode,
encode
});
//# sourceMappingURL=index.js.map
{
"name": "@abcnews/base-36-text",
"version": "1.0.0",
"version": "1.0.1",
"description": "Tools for encoding / decoding text to / from base36 strings",

@@ -21,3 +21,3 @@ "license": "MIT",

"main": "dist/index.js",
"module": "dist/base-36-text.esm.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",

@@ -29,15 +29,22 @@ "files": [

"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"lint": "tsdx lint src",
"example": "npm run build && rollup -c",
"start": "tsup src/index.ts --dts --sourcemap --format esm,cjs --watch",
"build": "tsup src/index.ts --dts --sourcemap --format esm,cjs",
"test": "jest --coverage",
"lint": "eslint src",
"size": "npm run build && size-limit",
"release": "np",
"prepare": "husky install",
"prepublishOnly": "npm run build",
"release": "np",
"test": "tsdx test"
"example": "npm run build && rollup -c"
},
"husky": {
"hooks": {
"pre-commit": "tsdx lint src"
"size-limit": [
{
"path": "dist/index.mjs",
"limit": "1.5 kB"
},
{
"path": "dist/index.js",
"limit": "1.5 kB"
}
},
],
"publishConfig": {

@@ -50,24 +57,27 @@ "access": "public"

"@babel/preset-env": "^7.12.1",
"@types/jest": "^26.0.15",
"husky": "^4.3.0",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-node-resolve": "^15.0.1",
"@size-limit/preset-small-lib": "^8.1.0",
"@types/jest": "^29.2.4",
"@typescript-eslint/eslint-plugin": "^5.46.0",
"@typescript-eslint/parser": "^5.46.0",
"eslint": "^8.29.0",
"husky": "^6.0.0",
"install": "^0.13.0",
"np": "^7.0.0",
"npm": "^7.2.0",
"rollup": "^2.33.2",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-serve": "^1.1.0",
"tsdx": "^0.14.1",
"jest": "^29.3.1",
"np": "^7.6.2",
"rollup": "^3.7.0",
"rollup-plugin-serve": "^2.0.2",
"size-limit": "^8.1.0",
"ts-jest": "^29.0.3",
"tslib": "^2.0.3",
"tsup": "^6.5.0",
"typescript": "^4.0.5"
},
"dependencies": {
"@types/fast-text-encoding": "^1.0.1",
"base-x": "^3.0.8",
"buffer": "^6.0.2",
"base-x": "^4.0.0",
"core-js": "^3.7.0",
"fast-text-encoding": "^1.0.3",
"sade": "^1.7.4"
}
}
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