instantid v1.0.6
InstantID TypeScript/Node.js SDK
Embed InstantID data classification service into Node.js or JavaScript applications
Features
This SDK provides JavaScript/TypeScript bindings for the InstantID classification service API. It allows you to classify data from your application, using 1 or more of InstantID's library of classifiers. Once your data is classified, it can be more easily be protected.
Additionally, this library provides convenience features such as encapsulating the steps to chunk and upload files.
To obtain an API Key, login to the InstantID and sign up for an account.
Dependencies
TypeScript v4.6.4 or later
For a full list of external dependencies please consult package.json
.
Installation
NPM
npm install instantid
Building Locally
Alternatively, if you would like to build the project yourself:
- Clone this git repository
- Run
npm install
from the top-level directory - Run
npm run build
to compile the TypeScript codebase into the ./dist folder (in some cases, you may be required to manually create the ./dist folder before you run this command) - Import the client like so:
import { InstantID } from './dist'
Usage
Classifying Plain Text
InstantID provides pre-built classifiers for identifying myriad types of data. The following snippet shows an example of how to classify data using pre-built classifiers.
Sample Code
import instant from 'instantid';
const client = new instant('<your api key>');
const response = await client.classify('Some really long string of data to include some sensitive data like date of birth: 01/01/1960, credit card number 1234-4567-8900-1960, etc.');
console.log(JSON.stringify(response));
License
This code is licensed under the terms of the MIT License. See here for more information.