diff --git a/README.md b/README.md index 8089b99..19cc4cd 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,8 @@ invoke( security.jsx ```jsx +import { mask } from "@neurospeech/jex/dist/index.js"; + //These are reusable functions... export const Security = { @@ -93,7 +95,7 @@ export const Security = { }) { return }, @@ -113,7 +115,7 @@ export const Security = { }) { return }, @@ -127,7 +129,7 @@ export const Security = { return x instanceof Secret ? x.secret : x), options); const pid = cd.pid; if (logCommand) { console.log(`${path} ${args.join(" ")}`); diff --git a/src/index.ts b/src/index.ts index c6b8f73..fd66555 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,7 @@ import { unlinkSync } from "fs"; import { Babel } from "./core/babel.js"; import XNode from "./core/XNode.js"; import { pathToFileURL } from "url"; +import { Secret } from "./core/Secret.js"; export { default as XNode } from "./core/XNode.js"; @@ -33,6 +34,8 @@ export const Log = ({ text = void 0 , error = void 0 }) => { } }; +export const mask = (secret: string) => new Secret(secret); + export const invoke = async (name: string | XNode , args?: string[]) => { if (name instanceof XNode) {