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

@nuclia/core

Package Overview
Dependencies
Maintainers
0
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuclia/core

SDK allowing to integrate Nuclia services in your frontend application

  • 1.22.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
139
decreased by-27.6%
Maintainers
0
Weekly downloads
 
Created
Source

Nuclia JavaScript SDK

Nuclia SDK is an open-source library wrapping Nuclia API in order to integrate Nuclia services in your frontend application.

It supports both JavaScript and TypeScript.

The full documentation is available at https://docs.nuclia.dev/docs/develop/js-sdk/.

Basic usage

import { Nuclia } from '@nuclia/core';

const nuclia = new Nuclia({
  backend: 'https://nuclia.cloud/api',
  zone: 'europe-1',
  knowledgeBox: '<YOUR-KB-ID>',
});
nuclia.knowledgeBox
  .search('where does the Little Prince live', [Search.Features.KEYWORD])
  .subscribe((searchResult) => {
    console.log('search result', searchResult);
  });

Usage with NodeJS

This SDK can work in NodeJS by providing some polyfills for localStorage and fetch:

const { Nuclia } = require('@nuclia/core');
require('localstorage-polyfill');
require('isomorphic-unfetch');

const nuclia = new Nuclia({
  backend: 'https://nuclia.cloud/api',
  zone: 'europe-1',
  knowledgeBox: '<YOUR-KB-ID>',
});

Keywords

FAQs

Package last updated on 14 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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