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

@oramacloud/client

Package Overview
Dependencies
Maintainers
2
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oramacloud/client - npm Package Compare versions

Comparing version 1.0.0-beta.19 to 1.0.0-beta.20

34

package.json
{
"name": "@oramacloud/client",
"version": "1.0.0-beta.19",
"version": "1.0.0-beta.20",
"description": "Orama SDK for Node.js, Deno, and Browsers",

@@ -22,4 +22,19 @@ "type": "module",

"types": "./dist/react/index.d.ts"
},
"./vue": {
"require": "./dist/vue/index.cjs",
"import": "./dist/vue/index.js",
"types": "./dist/vue/index.d.ts"
}
},
"scripts": {
"lint": "ts-standard --fix",
"build": "npm run build:lib && npm run build:react",
"build:lib": "tsup --config tsup.lib.js",
"build:react": "tsup --config tsup.react.js",
"build:vue": "tsup --config tsup.vue.js",
"test": "tsx tests/index.test.ts",
"serve:example": "esbuild src/index.ts --bundle --outfile=example/out.js --format=esm --watch --servedir=example",
"prepare": "husky install"
},
"keywords": [

@@ -43,3 +58,4 @@ "orama",

"@paralleldrive/cuid2": "^2.2.1",
"react": "^18.2.0"
"react": "^18.2.0",
"vue": "^3.3.4"
},

@@ -58,10 +74,8 @@ "devDependencies": {

},
"scripts": {
"lint": "ts-standard --fix",
"build": "npm run build:lib && npm run build:react",
"build:lib": "tsup --config tsup.lib.js",
"build:react": "tsup --config tsup.react.js",
"test": "tsx tests/index.test.ts",
"serve:example": "esbuild src/index.ts --bundle --outfile=example/out.js --format=esm --watch --servedir=example"
"ts-standard": {
"ignore": [
"dist",
"node_modules"
]
}
}
}
# Orama Cloud Client
## Install
```js

@@ -69,2 +70,45 @@ npm i @oramacloud/client

}
```
```
## With Vue
### Set up Orama Cloud singleton
Create a orama.ts file in the src folder to create a Orama Cloud Client instance that you’ll use throughout your application.
```ts
import { OramaCloud } from '@oramacloud/client/vue'
export const orama = new OramaCloud({
apiKey: '<Your Orama Cloud API Key>',
endpoint: '<Your Orama Cloud Endpoint>'
})
```
### Use the client instance in your component
```jsx
<template>
<li v-for="hit in searchResults?.hits" :key="hit.id">
{{ hit.id }}
</li>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { orama } from './orama'
const searchResults = ref(null)
onMounted(async () => {
if (orama) {
const { results, error } = await orama.search({
term: 'guitar',
limit: 5
})
searchResults.value = results
}
})
</script>
```
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