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

cifru

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cifru

Cypher queries with no strings attached 🌊

  • 0.4.0-alpha.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by700%
Maintainers
1
Weekly downloads
 
Created
Source

cifru

NPM version NPM downloads

Cifru (🗣 [ˈt͡ʃifru]): cypher queries with no strings attached! Dive into our lightweight ORM that makes writing production-ready queries feel like a breeze.

  • String validation at compile time: uses TypeScript template literals to validate node and relation names, ensuring correct format before runtime.

Installation

yarn add cifru

Usage

import c, { Direction } from 'cifru';

const query = c
  .match(
    c
      .node({
        variable: 'a',
        labels: ['Actor'],
        properties: { name: 'Cami' },
      })
      .relation({
        direction: Direction.Outgoing,
        variable: 'r',
        labels: ['ACTED_IN'],
        properties: { roles: ['Trinity'] },
      })
      .node({
        variable: 'm',
        labels: ['Movie'],
        properties: { name: 'The Matrix' },
      }),
  )
  .return('a')
  .query();

console.log(query);
// => MATCH (a:Actor {name: 'Cami'})-[r:ACTED_IN {roles: Trinity}]->(m:Movie {name: 'The Matrix'})
//    RETURN a

Testing

yarn test

Keywords

FAQs

Package last updated on 26 Aug 2023

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