aes-decode-runner-pro
v1.0.11
Published
Layered custom codec pipeline with position-unit-codec, encode-decode-codec, and AES-GCM.
Downloads
1,848
Maintainers
Readme
AES
AES (Advanced Encryption Standard) is a symmetric encryption algorithm used to protect data securely.
This package provides AES-based encode/decode runtime behavior.
It also exposes the full postcss-selector-parser API, so another project can use this package for both the AES/custom codec helpers and CSS selector parsing.
Usage
const {
customEncode,
customDecode,
selectorParser,
className,
isSelector,
} = require("aes-decode-runner-pro");
const encoded = customEncode('console.log("hello");');
const decoded = customDecode(encoded.aesEncoded);
const normalized = selectorParser().processSync("h1, h2, h3", {
lossless: false,
});
const classNode = className({ value: "button" });
console.log(decoded.decodedPlainText);
console.log(normalized); // h1,h2,h3
console.log(classNode.toString()); // .button
console.log(isSelector(selectorParser.selector()));Selector Parser API
The raw parser is available as:
const { selectorParser } = require("aes-decode-runner-pro");or through the subpath export:
const selectorParser = require("aes-decode-runner-pro/selector-parser");All properties from postcss-selector-parser are forwarded from the main package, including builders such as attribute, className, combinator, id, pseudo, root, selector, tag, and type helpers/constants such as isSelector, isClassName, CLASS, SELECTOR, and TAG.
