5.1.0 • Published 12 months ago

@contrast/distringuish v5.1.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
12 months ago

@contrast/distringuish

Node native module for tracking string literals with string externalization.

See this article for technical details.

Usage

const distringuish = require('@contrast/distringuish');

const externalString = distringuish.externalize(someString);
const props = distringuish.getProperties(externalString); // => {}
props.key = 'value';
// the object returned maintains properties pinned to the string
distringuish.getProperties(externalString); // => { key: "value" }

API

See index.d.ts.

externalize(str: string, props?: Record): string | number;
getProperties(str: string): Record | null;
isExternal(str: string): boolean;
internalize(str: string): string;

Building locally

npm run build will build the project for your current OS and architecture. npm run build:dev passes the --debug flag which can be useful during development.

npm run download will pull the most recent build artifacts from GitHub.

Publishing

Simply run npm version and then invoke the release workflow. You can run release using the github UI or, if you have the github CLI installed, you can run gh workflow run release.yml (also available via npm run release).

Note that upload-artifacts@v4 no longer works when there are multiple artifacts with the same name. That's why the release workflow has the following section:

  uses: actions/upload-artifact@v4
  with:
    name: prebuilds-${{ matrix.build-group }}
    path: prebuilds/

Style Guide

See .clang-format.

  • 4 spaces for indentation
  • open curly brace goes on the same line as the statement
5.1.0

12 months ago

5.0.0

1 year ago

4.5.0

1 year ago

4.4.0

2 years ago

4.3.0

2 years ago

4.2.1

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

1.7.0

6 years ago

1.3.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago