Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

feathers-yaml

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feathers-yaml

A LowDB feathers service store with Yaml support

latest
Source
npmnpm
Version
0.21.1
Version published
Maintainers
1
Created
Source

feathers-lowdb-yaml

Deprecated in favor of https://github.com/lwhiteley/feathers-lowdb

Node.js CI Download Status Discord

A Feathers service adapter for YAML data storage that works on all platforms. Using LowDB v3. Good for cashing, development, debugging and offline-support.

Run on Repl.it

Roadmap

  • Basic LowDB support
  • YAML support
  • Rename service and adapter
  • Publish to NPM
  • JSON support
  • MongoDB compatibility mode (ObjectID's)
  • Alternative production configuration (Swap in a binary DB in prod/staging)
$ npm i feathers-yaml

API

yaml([options])

Returns a new database instance initialized with the given options.

import { yaml as database } from 'feathers-yaml'

export const createModel = (app: Application) => {
  return database({
    filename: 'users.yaml',
    id: '_id', // todo: https://github.com/feathersjs/feathers/issues/2839
    startId: 1,
    paginate: {
      default: 2,
      max: 4
    }
  })
}

Options:

  • filename (_optional, default /tmp/low-123-321.yaml) - The full path to the file
  • id (optional, default: 'id') - The name of the id field property.
  • startId (optional, default: 0) - An id number to start with that will be incremented for every new record (unless it is already set).
  • store (optional) - An object with id to item assignments to pre-initialize the data store
  • events (optional) - A list of custom service events sent by this service
  • paginate (optional) - A pagination object containing a default and max page size
  • whitelist (DEPRECATED) - renamed to allow
  • allow (optional) - A list of additional query parameters to allow
  • multi (optional) - Allow create with arrays and update and remove with id null to change multiple items. Can be true for all methods or an array of allowed methods (e.g. [ 'remove', 'create' ])

Example

Todo

License

Copyright (c) 2023 Feathers contributors

Licensed under the MIT license.

Keywords

feathers

FAQs

Package last updated on 30 Apr 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