⚡️ lowdb is a small local JSON database powered by Lodash (supports Node, Electron and the browser)

Overview

Lowdb

Build Status npm

Small JSON database for Node, Electron and the browser. Powered by Lodash.

db.get('posts')
  .push({ id: 1, title: 'lowdb is awesome'})
  .write()

Usage

npm install lowdb
const low = require('lowdb')
const FileSync = require('lowdb/adapters/FileSync')

const adapter = new FileSync('db.json')
const db = low(adapter)

// Set some defaults (required if your JSON file is empty)
db.defaults({ posts: [], user: {}, count: 0 })
  .write()

// Add a post
db.get('posts')
  .push({ id: 1, title: 'lowdb is awesome'})
  .write()

// Set a user using Lodash shorthand syntax
db.set('user.name', 'typicode')
  .write()
  
// Increment count
db.update('count', n => n + 1)
  .write()

Data is saved to db.json

{
  "posts": [
    { "id": 1, "title": "lowdb is awesome"}
  ],
  "user": {
    "name": "typicode"
  },
  "count": 1
}

You can use any of the powerful lodash functions, like _.get and _.find with shorthand syntax.

// For performance, use .value() instead of .write() if you're only reading from db
db.get('posts')
  .find({ id: 1 })
  .value()

Lowdb is perfect for CLIs, small servers, Electron apps and npm packages in general.

It supports Node, the browser and uses lodash API, so it's very simple to learn. Actually, if you know Lodash, you already know how to use lowdb 😉

Important lowdb doesn't support Cluster and may have issues with very large JSON files (~200MB).

Install

npm install lowdb

Alternatively, if you're using yarn

yarn add lowdb

A UMD build is also available on unpkg for testing and quick prototyping:

<script src="https://unpkg.com/lodash@4/lodash.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/low.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/LocalStorage.min.js"></script>
<script>
  var adapter = new LocalStorage('db')
  var db = low(adapter)
</script>

API

low(adapter)

Returns a lodash chain with additional properties and functions described below.

db.[...].write() and db.[...].value()

write() writes database to state.

On the other hand, value() is just _.prototype.value() and should be used to execute a chain that doesn't change database state.

db.set('user.name', 'typicode')
  .write()

Please note that db.[...].write() is syntactic sugar and equivalent to

db.set('user.name', 'typicode')
  .value()

db.write()

db._

Database lodash instance. Use it to add your own utility functions or third-party mixins like underscore-contrib or lodash-id.

db._.mixin({
  second: function(array) {
    return array[1]
  }
})

db.get('posts')
  .second()
  .value()

db.getState()

Returns database state.

db.getState() // { posts: [ ... ] }

db.setState(newState)

Replaces database state.

const newState = {}
db.setState(newState)

db.write()

Persists database using adapter.write (depending on the adapter, may return a promise).

// With lowdb/adapters/FileSync
db.write()
console.log('State has been saved')

// With lowdb/adapters/FileAsync
db.write()
  .then(() => console.log('State has been saved'))

db.read()

Reads source using storage.read option (depending on the adapter, may return a promise).

// With lowdb/FileSync
db.read()
console.log('State has been updated')

// With lowdb/FileAsync
db.read()
  .then(() => console.log('State has been updated'))

Adapters API

Please note this only applies to adapters bundled with Lowdb. Third-party adapters may have different options.

For convenience, FileSync, FileAsync and LocalBrowser accept the following options:

  • defaultValue if file doesn't exist, this value will be used to set the initial state (default: {})
  • serialize/deserialize functions used before writing and after reading (default: JSON.stringify and JSON.parse)
const adapter = new FileSync('array.yaml', {
  defaultValue: [],
  serialize: (array) => toYamlString(array),
  deserialize: (string) => fromYamlString(string)
})

Guide

How to query

With lowdb, you get access to the entire lodash API, so there are many ways to query and manipulate data. Here are a few examples to get you started.

Please note that data is returned by reference, this means that modifications to returned objects may change the database. To avoid such behaviour, you need to use .cloneDeep().

Also, the execution of methods is lazy, that is, execution is deferred until .value() or .write() is called.

Reading from existing JSON file

If you are reading from a file adapter, the path is relative to execution path (CWD) and not to your code.

my_project/
  src/
    my_example.js
  db.json 

So then you read it like this:

// file src/my_example.js
const adapter = new FileSync('db.json')

// With lowdb/FileAsync
db.read()
  .then(() => console.log('Content of my_project/db.json is loaded'))

Examples

Check if posts exists.

db.has('posts')
  .value()

Set posts.

db.set('posts', [])
  .write()

Sort the top five posts.

db.get('posts')
  .filter({published: true})
  .sortBy('views')
  .take(5)
  .value()

Get post titles.

db.get('posts')
  .map('title')
  .value()

Get the number of posts.

db.get('posts')
  .size()
  .value()

Get the title of first post using a path.

db.get('posts[0].title')
  .value()

Update a post.

db.get('posts')
  .find({ title: 'low!' })
  .assign({ title: 'hi!'})
  .write()

Remove posts.

db.get('posts')
  .remove({ title: 'low!' })
  .write()

Remove a property.

db.unset('user.name')
  .write()

Make a deep clone of posts.

db.get('posts')
  .cloneDeep()
  .value()

How to use id based resources

Being able to get data using an id can be quite useful, particularly in servers. To add id-based resources support to lowdb, you have 2 options.

nanoid

const { nanoid } = require("nanoid")
const idlength = 8

const postId = db
  .get('posts')
  .push({ id: nanoid(idlength), title: 'low!' })
  .write()
  .id

const post = db
  .get('posts')
  .find({ id: postId })
  .value()

lodash-id provides a set of helpers for creating and manipulating id-based resources.

const lodashId = require('lodash-id')
const FileSync = require('lowdb/adapters/FileSync')

const adapter = new FileSync('db.json')
const db = low(adapter)

db._.mixin(lodashId)

// We need to set some default values, if the collection does not exist yet
// We also can store our collection
const collection = db
  .defaults({ posts: [] })
  .get('posts')

// Insert a new post...
const newPost = collection
  .insert({ title: 'low!' })
  .write()

// ...and retrieve it using its id
const post = collection
  .getById(newPost.id)
  .value()

How to create custom adapters

low() accepts custom Adapter, so you can virtually save your data to any storage using any format.

class MyStorage {
  constructor() {
    // ...
  }

  read() {
    // Should return data (object or array) or a Promise
  }

  write(data) {
    // Should return nothing or a Promise
  }
}

const adapter = new MyStorage(args)
const db = low(adapter)

See src/adapters for examples.

How to encrypt data

FileSync, FileAsync and LocalStorage accept custom serialize and deserialize functions. You can use them to add encryption logic.

const adapter = new FileSync('db.json', {
  serialize: (data) => encrypt(JSON.stringify(data)),
  deserialize: (data) => JSON.parse(decrypt(data))
})

Changelog

See changes for each version in the release notes.

Limits

Lowdb is a convenient method for storing data without setting up a database server. It is fast enough and safe to be used as an embedded database.

However, if you seek high performance and scalability more than simplicity, you should probably stick to traditional databases like MongoDB.

License

MIT - Typicode 🌵

Comments
  • How to use this with typescript?

    How to use this with typescript?

    Hey,

    i have added @types/lowdb and lowdb as dependencies in my nodejs project. They are downloaded. But i can't import lowdb?

    Whats wrong with this: import { lowdb } from 'lowdb';

    Sorry i think its just a simple thing but i cant see the problem at the current moment xD

    opened by LegendaryB 44
  • Update webpack to the latest version 🚀

    Update webpack to the latest version 🚀

    ☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

    Version 4.0.0 of webpack was just published.

    Dependency webpack
    Current Version 3.11.0
    Type devDependency

    The version 4.0.0 is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

    It might be worth looking into these changes and trying to get this project onto the latest version of webpack.

    If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


    Release Notes v4.0.0

    Big changes

    • Environment
      • Node.js 4 is no longer supported. Source Code was upgraded to a higher ecmascript version.
    • Usage
      • You have to choose (mode or --mode) between two modes now: production or development
        • production enables all kind of optimizations to generate optimized bundles
        • development enables comments and hint for development and enables the eval devtool
        • production doesn't support watching, development is optimized for fast incremental rebuilds
        • production also enables module concatenating (Scope Hoisting)
        • You can configure this in detail with the flags in optimization.* (build your custom mode)
        • process.env.NODE_ENV are set to production or development (only in built code, not in config)
        • There is a hidden none mode which disables everything
    • Syntax
      • import() always returns a namespace object. CommonJS modules are wrapped into the default export
        • This probably breaks your code, if you used to import CommonJs with import()
    • Configuration
      • You no longer need to use these plugins:
        • NoEmitOnErrorsPlugin -> optimization.noEmitOnErrors (on by default in production mode)
        • ModuleConcatenationPlugin -> optimization.concatenateModules (on by default in production mode)
        • NamedModulesPlugin -> optimization.namedModules (on by default in develoment mode)
      • CommonsChunkPlugin was removed -> optimization.splitChunks, optimization.runtimeChunk
    • JSON
      • webpack now handles JSON natively
        • You may need to add type: "javascript/auto" when transforming JSON via loader to JS
        • Just using JSON without loader should still work
      • allows to import JSON via ESM syntax
        • unused exports elimination for JSON modules
    • Optimization
      • Upgrade uglifyjs-webpack-plugin to v1
        • ES15 support

    Big features

    • Modules
      • webpack now supports these module types:
        • javascript/auto: (The default one in webpack 3) Javascript module with all module systems enabled: CommonJS, AMD, ESM
        • javascript/esm: EcmaScript modules, all other module system are not available
        • javascript/dynamic: Only CommonJS and, EcmaScript modules are not available
        • json: JSON data, it's available via require and import
        • webassembly/experimental: WebAssembly modules (currently experimental)
      • javascript/esm handles ESM more strictly compared to javascript/auto:
        • Imported names need to exist on imported module
        • Dynamic modules (non-esm, i. e. CommonJs) can only imported via default import, everything else (including namespace import) emit errors
      • In .mjs modules are javascript/esm by default
      • WebAssembly modules
        • can import other modules (JS and WASM)
        • Exports from WebAssembly modules are validated by ESM import
          • You'll get a warning/error when trying to import a non-existing export from WASM
        • can only be used in async chunks. They doesn't work in initial chunks (would be bad for web performance)
          • Import modules using WASM via import()
        • This is an experimental feature and subject of change
    • Optimization
      • sideEffects: false is now supported in package.json
        • sideEffects in package.json also supports glob expressions and arrays of glob expressions
      • Instead of a JSONP function a JSONP array is used -> async script tag support, order no longer matter
      • New optimization.splitChunks option was introduced
        Details: https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693
      • Dead branches are now removed by webpack itself
        • Before: Uglify removed the dead code
        • Now: webpack removes the dead code (in some cases)
        • This prevents crashing when import() occur in a dead branch
    • Syntax
      • webpackInclude and webpackExclude are supported by the magic comment for import(). They allow to filter files when using a dynamic expression.
      • Using System.import() now emits a warning
        • You can disable the warning with Rule.parser.system: true
        • You can disable System.import with Rule.parser.system: false
    • Configuration
      • Resolving can now be configured with module.rules[].resolve. It's merged with the global configuration.
      • optimization.minimize has been added to switch minimizing on/off
        • By default: on in production mode, off in development mode
      • optimization.minimizer has been added to configurate minimizers and options
    • Usage
      • Some Plugin options are now validated
      • CLI has been move to webpack-cli, you need to install webpack-cli to use the CLI
      • The ProgressPlugin (--progress) now displays plugin names
        • At least for plugins migrated to the new plugin system
    • Performance
      • UglifyJs now caches and parallizes by default
      • Multiple performance improvements, especially for faster incremental rebuilds
      • performance improvement for RemoveParentModulesPlugin
    • Stats
      • Stats can display modules nested in concatenated modules

    Features

    • Configuration
      • Module type is automatically choosen for mjs, json and wasm extensions. Other extensions need to be configured via module.rules[].type
      • Incorrect options.dependencies configurations now throw error
      • sideEffects can be overriden via module.rules
      • output.hashFunction can now be a Constructor to a custom hash function
        • You can provide a non-cryto hash function for performance reasons
      • add output.globalObject config option to allow to choose the global object reference in runtime exitCode
    • Runtime
      • Error for chunk loading now includes more information and two new properties type and request.
    • Devtool
      • remove comment footer from SourceMaps and eval
      • add support for include test and exclude to the eval source map devtool plugin
    • Performance
      • webpacks AST can be passed directly from loader to webpack to avoid extra parsing
      • Unused modules are no longer unnecessarly concatenated
      • Add a ProfilingPlugin which write a (Chrome) profile file which includes timings of plugins
      • Migrate to using for of instead of forEach
      • Migrate to using Map and Set instead of Objects
      • Migrate to using includes instead of indexOf
      • Replaced some RegExp with string methods
      • Queue don't enqueues the same job twice
      • Use faster md4 hash for hashing by default
    • Optimization
      • When using more than 25 exports mangled export names are shorter.
      • script tags are no longer text/javascript and async as this are the default values (saves a few bytes)
      • The concatenated module now generates a bit less code
      • constant replacements now don't need __webpack_require__ and argument is omitted
    • Defaults
      • webpack now looks for the .wasm, .mjs, .js and .json extensions in this order
      • output.pathinfo is now on by default in develoment mode
      • in-memory caching is now off by default in production
      • entry defaults to ./src
      • output.path defaults to ./dist
      • Use production defaults when omiting the mode option
    • Usage
      • Add detailed progress reporting to SourceMapDevToolPlugin
      • removed plugins now give a useful error message
    • Stats
      • Sizes are now shown in kiB instead of kB in Stats
      • entrypoints are now shows by default in Stats
      • chunks now display <{parents}> >{children}< and ={siblings}= in Stats
      • add buildAt time to stats
      • stats json now includes the output path
    • Syntax
      • A resource query is supported in context
      • Referencing entry point name in import() now emits a error instead of a warning
      • Upgraded to acorn 5 and support ES 2018
    • Plugins
      • done is now an async hook

    Bugfixes

    • Generated comments no longer break on */
    • webpack no longer modifies the passed options object
    • Compiler "watch-run" hook now has the Compiler as first parameter
    • add output.chunkCallbackName to the schema to allow configurating WebWorker template
    • Using module.id/loaded now correctly bails out of Module Concatentation (Scope Hoisting)
    • OccurenceOrderPlugin now sorts modules in correct order (instead of reversed)
    • timestamps for files are read from watcher when calling Watching.invalidate
    • fix incorrect -! behavior with post loaders
    • add run and watchRun hooks for MultiCompiler
    • this is now undefined in ESM
    • VariableDeclaration are correctly identified as var, const or let
    • Parser now parse the source code with the correct source type (module/script) when the module type javascript/dynamic or javascript/module is used.
    • don't crash on missing modules with buildMeta of null
    • add original-fs module for electron targets
    • HMRPlugin can be added to the Compiler outside of plugins

    Internal changes

    • Replaced plugin calls with tap calls (new plugin system)
    • Migrated many deprecated plugins to new plugin system API
    • added buildMeta.exportsType: "default" for json modules
    • Remove unused methods from Parser (parserStringArray, parserCalculatedStringArray)
    • Remove ability to clear BasicEvaluatedExpression and to have multiple types
    • Buffer.from instead of new Buffer
    • Avoid using forEach and use for of instead
    • Use neo-async instead of async
    • Update tapable and enhanced-resolve dependencies to new major versions
    • Use prettier

    Removed features

    • removed module.loaders
    • removed loaderContext.options
    • removed Compilation.notCacheable flag
    • removed NoErrorsPlugin
    • removed Dependency.isEqualResource
    • removed NewWatchingPlugin
    • removed CommonsChunkPlugin

    Breaking changes for plugins/loaders

    • new plugin system
      • plugin method is backward-compatible
      • Plugins should use Compiler.hooks.xxx.tap(<plugin name>, fn) now
    • New major version of enhanced-resolve
    • Templates for chunks may now generate multiple assets
    • Chunk.chunks/parents/blocks are no longer Arrays. A Set is used internally and there are methods to access it.
    • Parser.scope.renames and Parser.scope.definitions are no longer Objects/Arrays, but Map/Sets.
    • Parser uses StackedSetMap (LevelDB-like datastructure) instead of Arrays
    • Compiler.options is no longer set while applying plugins
    • Harmony Dependencies has changed because of refactoring
    • Dependency.getReference() may now return a weak property. Dependency.weak is now used by the Dependency base class and returned in the base impl of getReference()
    • Constructor arguments changed for all Modules
    • Merged options into options object for ContextModule and resolveDependencies
    • Changed and renamed dependencies for `import()
    • Moved Compiler.resolvers into Compiler.resolverFactory accessible with plugins
    • Dependency.isEqualResource has been replaced with Dependency.getResourceIdentifier
    • Methods on Template are now static
    • A new RuntimeTemplate class has been added and outputOptions and requestShortener has been moved to this class
      • Many methods has been updated to use the RuntimeTemplate instead
      • We plan to move code which accesses the runtime to this new class
    • Module.meta has been replaced with Module.buildMeta
    • Module.buildInfo and Module.factoryMeta have been added
    • Some properties of Module have been moved into the new objects
    • added loaderContext.rootContext which points to the context options. Loaders may use it to make stuff relative to the application root.
    • add this.hot flag to loader context when HMR is enabled
    • buildMeta.harmony has been replaced with buildMeta.exportsType: "namespace
    • The chunk graph has changed:
      • Before: Chunks were connected with parent-child-relationships.
      • Now: ChunkGroups are connected with parent-child-relationships. ChunkGroups contain Chunks in order.
      • Before: AsyncDependenciesBlocks reference a list of Chunks in order.
      • Now: AsyncDependenciesBlocks reference a single ChunkGroup.
    • file/contextTimestamps are Maps now
    • map/foreach Chunks/Modules/Parents methods are now deprecated/removed
    • NormalModule accept options object in Constructor
    • Added required generator argument for NormalModule
    • Added createGenerator and generator hooks for NormalModuleFactory to customize code generation
    • Allow to customize render manifest for Chunks via hooks
    Commits

    The new version differs by 838 commits.

    • 213226e 4.0.0
    • fde0183 Merge pull request #6081 from webpack/formating/prettier
    • b6396e7 update stats
    • f32bd41 fix linting
    • 5238159 run prettier on existing code
    • 518d1e0 replace js-beautify with prettier
    • 4c25bfb 4.0.0-beta.3
    • dd93716 Merge pull request #6296 from shellscape/fix/hmr-before-node-stuff
    • 7a07901 Merge pull request #6563 from webpack/performance/assign-depth
    • c7eb895 Merge pull request #6452 from webpack/update_acorn
    • 9179980 Merge pull request #6551 from nveenjain/fix/templatemd
    • e52f323 optimize performance of assignDepth
    • 6bf5df5 Fixed template.md
    • 90ab23a Merge branch 'master' into fix/hmr-before-node-stuff
    • b0949cb add integration test for spread operator

    There are 250 commits in total.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 30
  • node@14.16.0 Error [ERR_REQUIRE_ESM]

    [email protected] Error [ERR_REQUIRE_ESM]

    node: 14.16.0 electron: 13.0.1 webpack: 4.46.0

    import { Low, JSONFile } from 'lowdb'
    
    const adapter = new JSONFile('example.json')
    
    export const lowdb = new Low(adapter)
    

    The above code run error, ERR_REQUIRE_ESM has been prompted, what is the solution?

    image

    opened by GuoSirius 19
  • Error: Could not find module in path: 'lowdb'

    Error: Could not find module in path: 'lowdb'

    Looks like something is up with the module reference with 2.x

    I created a demo on codesandbox showing the issue: https://codesandbox.io/s/lowdb2-jz3wf?file=/src/index.ts

    opened by james2doyle 18
  • lowdb without lodash

    lowdb without lodash

    Just want to run this idea by you. I love lowdb but I have no need for the lodash features at the moment so it just adds a ton of weight for me.

    What would you think about releasing the core lowdb as a separate module and the current lowdb can simply wrap the new core lib in lodash.

    If that doesn't appeal to you then how about exposing a way for us to use lowdb without relying on lodash? This might be as simple as adding an index.light.js which provides a mocked empty version of lodash.

    These are just ideas, feel free to close this and keep doing what you're doing because lowdb is awesome! 👍

    opened by davej 15
  • error when executing low.mixin

    error when executing low.mixin

    var low = require('lowdb');
    var _contrib = require('underscore-contrib') // For getPath()
    var _db = require('underscore.db')
    
    low.mixin(_contrib);
    low.mixin(_db);
    

    I saw your example to insert json with inner nodes of the other json. but I get this error when I execute the same code. Not sure what is missing here.

    image

    Thanks,

    opened by balasivagnanam 15
  • hi  ~TT~my node is dont; Ruck.. . help me!

    hi ~TT~my node is dont; Ruck.. . help me!

    image Hello teacher, this is my app node ...... I directly "install lowdb NPM", but now there is a problem: that I can print out of the memory of a new JSON. Can't save it to the local <gameDB.JSON> file. I would like to ask in the use of Node, how to set up the data can be saved to the local disk <gameDb.Json> in it? image ..

    opened by faye198x 13
  • Next version checklist

    Next version checklist

    • [x] Rename storages to adapters to make it more obvious what they are
    • [x] Refactor adapters to function or class instead of object @typicode https://github.com/typicode/lowdb/pull/196
    • [x] Refactor low function to work with new adapters @typicode https://github.com/typicode/lowdb/pull/196
    • [x] Upgrade all dependencies and devDependencies
    • [ ] Catch error, if possible, when file is too big and parse/stringify fail, display a message like in https://github.com/typicode/lowdb/issues/180
    • [x] Copy .eslintrc from https://github.com/typicode/json-server/blob/master/.eslintrc.js
    • [x] Remove default storages, make low() memory only and browser config in package.json? Feedback welcome, related to https://github.com/typicode/lowdb/issues/189 and https://github.com/typicode/lowdb/issues/188 @typicode https://github.com/typicode/lowdb/pull/196

    If you create a PR, please create one PR per item.

    Work can be found on 0.17 branch.

    PR welcome 
    opened by typicode 12
  • Will lowdb work with react native using a native file driver?

    Will lowdb work with react native using a native file driver?

    I'm looking to start an app soon that will have a desktop app using electron, and mobile apps using electron. One of the possibilities that i'm considering is using lowdb as the storage engine. It should work fine with electron, but I'm curious how it would work alongside a react native app.

    I'm not very familiar with mobile apps, but if I were to write a custom storage adapter using something like React Native FS would it work?

    opened by jcloutz 12
  • Rename project?

    Rename project?

    Hi,

    I'm thinking about renaming the project as v2 will be smaller and simpler (lodash won't be included by default).

    Especially, I'm wondering if db in the lowdb isn't too much. After all, it just stores data in JSON or other formats using adapters. But on the other side, the idea is to use it when you don't need a "real" db.

    So what do you think? Should lowdb name be kept? What would you suggest for another name?

    • :+1: on this message, if you think it shouldn't be changed
    • add a comment below if you have a suggestion

    Thanks for your feedback!

    opened by typicode 11
  • fs.existsSync is not a function

    fs.existsSync is not a function

    Hi, I'm developping an app with angular 9 and electron. I'm trying to using this db but I'm unable to make it work.

    This is my DBHandler typescript code:

    import * as low from "lowdb" import * as FileSync from "lowdb/adapters/FileSync" const adapter = new FileSync('db.json') const db = low(adapter) ... get(): any[] { return db.get('posts').find().value() }

    And to compile it, I must set this on my package.json:

    "browser": { "child_process": false, "clearImmediate": false, "setImmediate": false, "https": false, "http": false, "crypto": false, "tls": false, "zlib": false, "os": false, "stream": false, "vm": false, "fs": false, "path": false, "graceful-fs": false }, "node": { "global": true, "net": true, "process": true, "module": true, "clearImmediate": true, "setImmediate": true, "https": true, "http": true, "crypto": true, "tls": true, "zlib": true, "os": true, "path": true, "stream": true, "vm": true, "fs": true, "child_process": true, "graceful-fs": true },

    After compiling and lunch app, in electron dev tools I read this error:

    Uncaught TypeError: fs.existsSync is not a function at FileSync.read (FileSync.js:32) at LodashWrapper.db.read (main.js:32) at push../node_modules/lowdb/lib/main.js.module.exports (main.js:51) at Module../src/utils/DBHandler.ts (DBHandler.ts:6) at webpack_require (bootstrap:79) at Module../src/utils/Class1Utils.ts (Class1Utils.ts:1) at webpack_require (bootstrap:79) at Module../src/scraper/Class2Utils.ts (Class2Utils.ts:1) at webpack_require (bootstrap:79) at Module../src/scraper/Class3Utils.ts (Class3Utils.ts:31)

    read | @ | FileSync.js:32

    -- | -- | --   | db.read | @ | main.js:32   | push../node_modules/lowdb/lib/main.js.module.exports | @ | main.js:51   | ./src/utils/DBHandler.ts | @ | DBHandler.ts:6   | webpack_require | @ | bootstrap:79   | ./src/utils/Class1Utils.ts | @ | Class1Utils.ts:1   | webpack_require | @ | bootstrap:79   | ./src/scraper/Class3Utils.ts | @ | Class3Utils.ts:1   | webpack_require | @ | bootstrap:79   | ./src/scraper/Class4Utils.ts | @ | Class5Utils.ts:31   | webpack_require | @ | bootstrap:79   | ./src/app/home/apphome.component.ts | @ | app.module.ts:56   | webpack_require | @ | bootstrap:79   | ./src/app/home/index.ts | @ | index.ts:1   | webpack_require | @ | bootstrap:79   | ./src/app/app-routing.module.ts | @ | app-routing.module.ts:1   | webpack_require | @ | bootstrap:79   | ./src/app/app.module.ts | @ | app.module.ts:1   | webpack_require | @ | bootstrap:79   | ./src/main.ts | @ | main.ts:1   | webpack_require | @ | bootstrap:79   | 0 | @ | callbackOnClick.js:32   | webpack_require | @ | bootstrap:79   | checkDeferredModules | @ | bootstrap:45   | webpackJsonpCallback | @ | bootstrap:32   | (anonymous) | @ | main-es2015.js:1

    I hope someone can help me. Thank you

    opened by 0Franky 11
  • Import issue on typescript

    Import issue on typescript

    By importing lowdb in my typescript project I get below error

    Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/amin/Work/giveth/giveconomy-notification-service/node_modules/lowdb/lib/index.js from /Users/amin/Work/giveth/giveconomy-notification-service/src/repository/database.ts not supported.
    Instead change the require of index.js in /Users/amin/Work/giveth/giveconomy-notification-service/src/repository/database.ts to a dynamic import() which is available in all CommonJS modules.
    

    Related dependencies:

    ts-node: "^10.9.1", typescript: "^4.9.3", Nodejs 16

    tsconfig: ... "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, "lib": [ /* Specify library files to be included in the compilation. */ "es2018", "es2019", "esnext.asynciterable" ], ....

    setting type:module in package.json didn't solve the problem

    opened by aminlatifi 4
  • Whether to use faster json serialization method

    Whether to use faster json serialization method

    Whether to use faster json serialization method

    If speed hits a bottleneck, I don't mind writing some scheme to improve it.

    In addition, scheme has other uses, such as generating API text.

    https://dev.to/samchon/i-made-10x-faster-jsonstringify-functions-even-type-safe-2eme

    refer to

    This is probably the simplest solution compared to the current solution without a database adapter.

    1. Developers customize the scheme of json
    2. stringify generates templates and methods according to scheme
    3. The developer uses the method to generate
    • https://github.com/kawanet/msgpack-lite
    • https://github.com/andreyvit/json-diff
    • https://github.com/davidmarkclements/flatstr
    • https://github.com/epoberezkin/fast-json-stable-stringify
    • https://github.com/fastify/fast-json-stringify -- Requires the full scheme in object form
    • https://github.com/lucagez/slow-json-stringify -- Simpler scheme
    opened by wll8 0
  • [Error: ENOENT: no such file or directory, rename '.database.json.tmp' -> 'database.json']

    [Error: ENOENT: no such file or directory, rename '.database.json.tmp' -> 'database.json']

    How to fix this ? [Error: ENOENT: no such file or directory, rename '.database.json.tmp' -> 'database.json'] { errno: -2, code: 'ENOENT', syscall: 'rename', path: '.database.json.tmp', dest: 'database.json' } unhandledRejection [Error: ENOENT: no such file or directory, rename '.database.json.tmp' -> 'database.json'] { errno: -2, code: 'ENOENT', syscall: 'rename', path: '.database.json.tmp', dest: 'database.json' } unhandledRejection [Error: ENOENT: no such file or directory, rename '.database.json.tmp' -> 'database.json'] { errno: -2, code: 'ENOENT', syscall: 'rename', path: '.database.json.tmp', dest: 'database.json' } unhandledRejection [Error: ENOENT: no such file or directory, rename '.database.json.tmp' -> 'database.json'] { errno: -2, code: 'ENOENT', syscall: 'rename', path: '.database.json.tmp', dest: 'database.json' } unhandledRejection

    opened by bolaxd 3
  • Can't import JSONFile from

    Can't import JSONFile from "lowdb/node" import.

    When I use import {JSONFile} from 'lowdb/lib/node' it return the following error message.

    [ERROR] Could not resolve "lowdb/lib/node"
        src/users.ts:2:23:
          2 │ import {JSONFile} from 'lowdb/lib/node'
            ╵                        ~~~~~~~~~~~~~~~~
      The path "./lib/node" is not exported by package "lowdb":
    

    I'm using Esbuild, I tried to make this package external, or tried find another import path, but I can't make it work without modifying the lowdb source code. This is what I did :

    index.js

    export * from './adapters/Memory.js';
    export * from './adapters/MemorySync.js';
    export * from './Low.js';
    export * from './LowSync.js';
    + export * from './node.js';
    

    I tried to use the documentation path import {JSONFile} from 'lowdb/node' but typescript can't find the module.

    opened by Trystan-SA 29
Releases(v5.0.0)
  • v5.0.0(Oct 22, 2022)

    Better support for front-end tools like Vite, CodeSandbox, ...

    To achieve this, Node and Browser (localStorage) adapters are now split in two. Besides that, there are no other breaking changes.

    Node

    // Before
    import { Low, JSONFile } from 'lowdb'
    
    // After
    import { Low } from 'lowdb'
    import { JSONFile } from 'lowdb/node'
    

    lowdb/node exports JSONFile, JSONFileSync, TextFile and TextFileSync.

    Browser

    // Before
    import { LowSync, LocalStorage } from 'lowdb'
    
    // After
    import { LowSync } from 'lowdb'
    import { LocalStorage } from 'lowdb/browser'
    

    lowdb/browser exports LocalStorage.

    Source code(tar.gz)
    Source code(zip)
  • v4.0.0(Oct 17, 2022)

  • v3.0.0(Sep 13, 2021)

  • v2.1.0(May 24, 2021)

  • v2.0.0(May 20, 2021)

    • Out of the box and improved TypeScript support.
    • Uses new steno version for fast async file writes.
    • Uses ECMAScript modules.
    • Plain JS can now be used to modify and query db.data
    • Reduced install size.
    • With native JavaScript improvements, lodash is now optional (you can still use it though as it provides powerful utilities).

    To help with OSS funding, lowdb v2 is released under Parity license for a limited time. It'll be released under MIT license once the goal of 100 sponsors is reached (currently at 55) or in five months. See README for complete explanation.

    You can sponsor me on GitHub Sponsors.

    Thank you!

    Migrate

    Lowdb v1

    const low = require('lowdb')
    const FileSync = require('lowdb/adapters/FileSync')
    
    const adapter = new FileSync('db.json')
    const db = low(adapter)
    
    // Set some defaults
    db.defaults({ posts: [], user: {} })
      .write()
    
    // Add a post
    db.get('posts')
      .push({ id: 1, title: 'lowdb is awesome'})
      .write()
    
    // Set a user name using Lodash shorthand syntax
    db.set('user.name', 'typicode')
      .write()
    

    Lowdb v2

    import { Low, FileSync } from 'lowdb'
    
    const adapter = new FileSync('db.json')
    const db = new Low(adapter)
    
    // Set some defaults
    db.data ||= { posts: [], user: {} })
    db.write()
    
    // Add a post
    db.data
      .posts
      .push({ id: 1, title: 'lowdb is awesome'})
    db.write()
    
    // Set a user name using plain JS
    db.data.user.name = 'typicode'
    db.write()
    

    If you're using TypeScript, data can now be typed:

    type Post = {
      id: number
      title: string
    }
    
    type Data = {
      posts: Post[]
    }
    
    const db = new Low<Data>(adapter)
    

    To continue using lodash with lowdb:

    npm install lodash
    
    import lodash from 'lodash'
    
    // Set a user name using Lodash shorthand syntax
    db.chain = lodash.chain(db.data)
    db.chain
      .set('user.name', 'typicode')
      .value()
    db.write()
    

    Breaking changes

    The following methods and properties have been removed:

    • db.getState (use db.data instead)
    • db.setState (use db.data = ... instead)
    • db._
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Aug 31, 2017)

    First stable release :tada: :smile:

    Thanks to all the people who have contributed to lowdb!

    If you've already updated Lowdb to v0.17, you have nothing to change.

    Source code(tar.gz)
    Source code(zip)
  • v0.17.2(Aug 23, 2017)

  • v0.17.0(Aug 20, 2017)

    Breaking changes

    low() function has been updated to be more explicit and fully storage agnostic. It now expects an adapter to be passed.

    Also, when using async file storage, low() will now return a Promise, making it truely asyncrhonous, rather than the database instance.

    tl;dr

    See Examples page for updated code samples.

    Migration guide

    // 0.16
    const db = low('db.json')
    
    // 0.17
    const low = require('lowdb')
    const FileSync = require('lowdb/adapters/FileSync')
    
    const adapter = new FileSync('db.json')
    const db = low(adapter)
    

    The rest of lowdb API is unchanged, database instance creation is the only part of your code that needs to be updated.

    Adapters

    Lowdb comes bundled with 4 adapters:

    • lowdb/adapters/FileSync
    • lowdb/adapters/FileAsync
    • lowdb/adapters/LocalStorage
    • lowdb/adapters/Memory

    Special thanks to @yeskunall for the help!

    Source code(tar.gz)
    Source code(zip)
  • v0.16.0(Mar 9, 2017)

    In this release, json-parse-helpfulerror is not included by default anymore due to issues with WebPack https://github.com/typicode/lowdb/issues/153.

    That said, you can still configure lowdb to use it:

    const low = require('lowdb')
    const jph = require('json-parse-helpfulerror');
    
    const db = low('db.json', {
      format: {
        stringify: JSON.stringify,
        parse: jph.parse
      }
    })
    
    Source code(tar.gz)
    Source code(zip)
  • v0.15.0(Feb 7, 2017)

    Improvements

    • Smaller core
    • Faster by default
    • Better async/await support

    Breaking changes

    .value() doesn't persist database anymore, instead .write() should be used after you modify the database:

    // before
    const result = db.get('posts')
      .push(post)
      .value()
    
    // after
    const result = db.get('posts')
      .push(post)
      .write()
    

    This change makes using async/await syntax easier:

    // before
    function create(post) {
      const result = db.get('posts')
        .push(post)
        .value()
    
      return db.write()
        .then(() => result)
    }
    
    // after
    async function create (post) {
      const result = await db.get('posts')
        .push(post)
        .write()
    }
    

    Other changes

    • writeOnChange is deprecated as write is now explicit.
    • storages are available under lib/storages (example: lowdb/lib/storages/file-async)
    • .d.ts file has been removed

    Why?

    In v0.14.0, every time .value was called, JSON.stringify was run to detect changes. Although this worked for small databases, it wasn't efficient for bigger ones.

    Alternatively, it was possible to disable this behaviour using writeOnChange: false and improve performances but its usage wasn't obvious.

    Additionally, it makes clearer when data is written and when not.

    Source code(tar.gz)
    Source code(zip)
  • v0.14.0(Oct 25, 2016)

    To make things easier for people installing lowdb and because there's not much value in having lodash as a peer dependency, this version moves lodash back to dependencies (see https://github.com/typicode/lowdb/issues/127)

    How to migrate?

    If you're not requiring lodash in your code, run the following command:

    npm uninstall lodash --save
    

    Or simply remove lodash from your dependencies in package.json

    Source code(tar.gz)
    Source code(zip)
  • v0.13.0(Jun 6, 2016)

    This release contains breaking changes, please read the migration guide. In particular, db('name') is removed in favor of lodash _.get() and it's possible now to use _.set() to update database.

    Overall, this version lets you use more of lodash API and is more flexible.

    Changes

    • db('name') has been removed. It was redundant with _.get().
    • .value() won't return a promise anymore. There was a bug with it and it wasn't clear when a promise would be returned or not.
    • db.object has been replaced by db.getState() and db.setState(). Future versions of lowdb should support arrays and not only objects as root structures.
    • _.set() support makes it simpler to replace collections compared to db.object.prop = newValue; db.write().
    • low() signature has changed, writeOnChange param is now part of the option param.
    • lodash is now a peerDependency so you can have more control on which version is used.

    In this release, you MUST ALWAYS call .value() at the end of a query to execute it

    // won't be executed and won't create posts array in database
    const chain = db.get('posts', []) 
    
    // posts array will be created
    chain.value() 
    

    Migration guide

    Installation

    Since lodash is now a peerDependency, you need to add it to your dependencies.

    npm install lowdb lodash@4 --save
    

    Getting a collection

    // v0.12
    var posts = db('posts')
    posts.value()
    
    // v0.13
    var posts = db.get('posts', [])
    posts.value()
    

    Pushing an item

    // v0.12
    posts.push({ title:'foo' })
    
    // v0.13
    posts.push({ title:'foo' }).value()
    

    Replacing a collection

    // v0.12
    var filteredPosts = posts.filter({ published: true })
    
    db.objects.posts = filteredPosts
    db.write()
    
    // v0.13
    var filteredPosts = posts
      .filter({ published: true })
      .value()
    
    db.set('posts', filteredPosts)
      .value()
    

    If you're using file-async

    // v0.12
    var db = low('db.json', { storage: fileAsync })
    
    db('posts')
      .push({ title: 'foo' })
      .then(() => console.log('done'))
    
    // v0.13
    var db = low('db.json', { storage: fileAsync })
    
    // data is persisted in the background now
    db.get('posts')
      .push({ title: 'foo' })
      .value()
    

    If you need to control/know when data is written, disable writeOnChange and call db.write() manually:

    var db = low('db.json', {
      storage: fileAsync,
      writeOnChange: false
    })
    
    db('posts')
      .push({ title: 'foo' })
      .value()
    
    db.write()
      .then(() => console.log('done')
    
    Source code(tar.gz)
    Source code(zip)
  • v0.13.0-beta-5(May 27, 2016)

  • v0.13.0-beta.4(May 27, 2016)

  • v0.12.4(Feb 17, 2016)

    Standalone UMD builds are now available. Check dist directory after installing lowdb.

    You can also use npmcdn to access them: http://npmcdn.com/lowdb@^0.12.4/dist/lowdb.min.js

    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Jan 13, 2016)

    This version uses lodash v4. Lowdb API doesn't change, however you may have to update the lodash methods you're using.

    // lowdb v0.11 (with lodash v3)
    const low = require('lowdb')
    const db = low()
    
    db('posts').where({ title: 'JavaScript' })
    
    // lowdb v0.12 (with lodash v4)
    const low = require('lowdb')
    const db = low()
    
    // .where() has been replaced by .filter() in lodash v4
    // so you need to use the new method
    db('posts').filter({ title: 'JavaScript' })
    

    Read lodash breaking changes.

    Source code(tar.gz)
    Source code(zip)
  • v0.11.3(Jan 7, 2016)

  • v0.11.2(Dec 25, 2015)

    Add Promise support for storage.read. This makes possible to have fully asynchronous db creation.

    const low = require('lowdb')
    const storage = require('some-promise-based-storage')
    
    low(source, { storage }).then(db => {
      // db is ready
    })
    
    Source code(tar.gz)
    Source code(zip)
  • v0.11.1(Dec 16, 2015)

  • v0.11.0(Dec 15, 2015)

    Thank you everyone for all the Pull Requests, feedbacks, ideas, issues, questions... it helped a lot!

    What's new

    • Browser support
    • Custom storage support
    • Per-db custom format
    • Promise support
    • Complete rewrite in ES2015+
    • Node 0.10 support has been dropped
    • ... still as small as ever :)

    TL;DR

    This is a major release that adds browser and custom storage support.

    • low() method has changed.
    • .value() and db[lodash-method]() will return a Promise when storage is asynchronous and database is modified.

    You can find detailed explanations below and in the README.

    Custom storage

    For the past few months, there were many requests to support more storage options (LocalStorage, multiple files, MongoDB, ...).

    Unfortunatly, despite the fact that there were great ideas, it wasn't possible to extend lowdb and supporting all these storages inside the project would have made it bloated

    With this release, it's now possible to tell lowdb how to store data by passing storage.read and storage.write functions when creating database.

    const myStorage = {
      read: (source, serialize) => // ...
      // when writing, you can return a Promise for asynchronous operations
      // or undefined if syncrhonous
      write: (source, object, deserialize) => // ...
    }
    
    const source = 'db.json'
    const db = low(source, { storage })
    

    Lowdb comes bundled with lowdb/file-sync, lowdb/file-async and lowdb/browser storages.

    Per-db custom format

    const format = {
      serialize: (obj) => // data
      deserialize: (data) => // obj
    }
    
    const db = low(source, { format })
    

    If format.serialize or format.deserialize functions are set, lowdb will automatically pass them to storage.write and storage.read functions.

    Promise

    If storage.write is asynchronous and returns a Promise, when the database is modified .value() and db[lodash-method]() will return a Promise that resolves to the value.

    const storage = require('lowdb/file-async')
    
    const db = low('db.json', storage)
    const posts = db('posts')
    
    // Return a Promise because writing is asynchronous
    posts.push({ title: 'lowdb' }).then(post => /* */)
    posts.chain().push({ title: 'lowdb' }).value().then(post => /* */)
    
    // No promise because reading is done in memory and is synchronous
    const post = posts.first()
    

    Migration guide

    Async mode (don't forget that in async mode, promises will be returned when modifying the database)

    // before
    const db = low('db.json')
    
    // after
    const storage = require('lowdb/file-async')
    const db = low('db.json', { storage })
    

    In-memory

    // doesn't change
    const db = low() 
    

    Sync mode

    // before
    const db = low('db.json', { async: false }) 
    
    // after
    const db = low('db.json', { storage: require('lowdb/file-sync') })
    

    autoSave option is now an argument in low()

    // before
    const db = low('db.json', { autoSave: false }) 
    
    // after
    const db = low('db.json', { storage }, false)
    

    low.parse and low.stringify has been moved too

    // before
    low.parse = myParse
    low.stringify = myStringify
    
    // after
    const db = low('db.json', {
      format: { serialize: myStringify, deserialize: myParse }
    })
    

    db.save() has been renamed to db.write()

    db.saveSync() has been removed, use lowdb/file-sync and call db.write()

    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Feb 3, 2015)

    Features

    • Updated to lodash v3.0.0 (changelog)
    • Better performance

    Breaking changes

    Because of the way chaining works now in lodash, chain() must be explicitly called. In other cases, simply calling the method returns the value.

    Before

    var songs = db('songs').push({ title: 'some song' }).value()
    db('songs')
      .find({ title: 'low!' })
      .assign({ title: 'hi!'})
      .value()
    

    After

    var songs = db('songs').push({ title: 'some song' })
    db('songs')
      .chain()
      .find({ title: 'low!' })
      .assign({ title: 'hi!'})
      .value()
    
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Oct 15, 2014)

  • v0.4.2(Oct 9, 2014)

  • v0.4.1(Sep 17, 2014)

  • v0.4.0(Sep 3, 2014)

    New features

    Version 0.4.0 is a complete rewrite of the project in order to achieve:

    • Better fault tolerancy
      • Writing is now atomic. Even if your process crashes, you won't have half written corrupted JSON files.
    • Better asynchronism
      • Writing is now fully asynchronous.
    • Better flexibility
      • Custom functions and third-party libraries can now be added using low.mixin().
      • Underscore.db dependency was removed, LowDB is now pure Lo-Dash. Underscore.db can still be added though using low.mixin().
    • Better API
      • Database is now automatically loaded when calling low(filename)
    • Multiple database support
      • You can work with multiple JSON files.

    Breaking changes

    During the process, some compromises needed to be made. Here's the list of the breaking changes:

    • API

    v0.3.x

    var low = require('lowdb').load() // loads db.json (by default)
    var posts = low('posts').sortBy('title').value()
    

    v0.4.0

    var low = require('lowdb')
    var db = low('db.json') // loads db.json (must be explicit)
    
    var posts = db('posts').sortBy('title').value()
    
    • Events

    Removed to simplify code. You can use Watch.js to monitor database object or similar projects.

    Also Object.observe() will be available in Node 0.12, so it's just a matter of time before you can have database object events back.

    • options

    Removed. Use low() instead.

    var db = low()          // same as autoSave: false
    var db = low('db.json') // same as autoSave: true and path: 'db.json'
    
    • short syntax

    Removed. Short syntax was mainly an experiment. If you need it back, please create an issue.

    • Underscore.db methods

    Underscore.db dependency was removed. You can use Lo-Dash methods to query or manipulate data like push(), where(), ... instead of insert(), get(), ...

    Or you can use mixin() to add Underscore.db back .

    See README for informations about how to extend LowDB.

    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Sep 3, 2014)

Owner
null
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

TypeORM is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be used

null 30.1k Jan 3, 2023
The JavaScript Database, for Node.js, nw.js, electron and the browser

The JavaScript Database Embedded persistent or in memory database for Node.js, nw.js, Electron and browsers, 100% JavaScript, no binary dependency. AP

Louis Chatriot 13.2k Jan 2, 2023
AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.

Please use version 1.x as prior versions has a security flaw if you use user generated data to concat your SQL strings instead of providing them as a

Andrey Gershun 6.1k Jan 9, 2023
A JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations.

What is dbcopycat A JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations. ⚡️ Abilities Creates the f

İsmail Can Karataş 13 Jan 8, 2023
Like JSON-RPC, but supports streaming.

Earthstar Streaming RPC Similar to JSON-RPC, but also supports streaming (soon). Written to be used in Earthstar (github, docs). Table of Contents Usa

Earthstar Project 5 Feb 10, 2022
A database library stores JSON file for Node.js.

concisedb English | 简体中文 A database library stores JSON file for Node.js. Here is what updated every version if you want to know. API Document Usage B

LKZ烂裤子 3 Sep 4, 2022
A transparent, in-memory, streaming write-on-update JavaScript database for Small Web applications that persists to a JavaScript transaction log.

JavaScript Database (JSDB) A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to

Small Technology Foundation 237 Nov 13, 2022
🔥 Dreamy-db - A Powerful database for storing, accessing, and managing multiple database.

Dreamy-db About Dreamy-db - A Powerful database for storing, accessing, and managing multiple databases. A powerful node.js module that allows you to

Dreamy Developer 24 Dec 22, 2022
A web client port-scanner written in GO, that supports the WASM/WASI interface for Browser WebAssembly runtime execution.

WebAssembly Port Scanner Written in Go with target WASM/WASI. The WASM main function scans all the open ports in the specified range (see main.go), vi

Avi Lumelsky 74 Dec 27, 2022
DolphinDB JavaScript API is a JavaScript library that encapsulates the ability to operate the DolphinDB database, such as: connecting to the database, executing scripts, calling functions, uploading variables, etc.

DolphinDB JavaScript API English | 中文 Overview DolphinDB JavaScript API is a JavaScript library that encapsulates the ability to operate the DolphinDB

DolphinDB 6 Dec 12, 2022
Database in JSON, fast and optimize

?? Database-Dev ?? DevNetwork#2103 ?? V 1.0.0 ?? Dependence Libs use ?? NodeJs V 16.14.2 (NodeJs) ?? fs (nodeFS) ?? Use libs import the file in your p

DevNetwork™️ 3 Apr 21, 2022
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite datab

MikroORM 5.4k Dec 31, 2022
Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use.

Lovefield Lovefield is a relational database written in pure JavaScript. It provides SQL-like syntax and works cross-browser (currently supporting Chr

Google 6.8k Jan 3, 2023
Modular Redis connection and PUBSUB subscription manager for node. Easily extendable. Built for performance, powered by ioredis.

RediBox Redis connection and PUBSUB subscription manager for node. Built for performance, powered by ioredis (for now). Maintained by TeamFA. What is

RediBox 83 Dec 15, 2022
A lightweight IDE that supports verilog simulation and Risc-V code compilation

EveIDE_LIGHT 使用手册 当前版本 : v0.0.2-beta (支持windows7以上版本 64位操作系统) 作者 : Adancurusul 版本说明 版本部分特性 概述 什么是EveIDE_LIGHT 使用介绍 选择工作区 进入主界面 左侧模组区 工程视图 编译设置 仿真设置 右侧

Chen Yuheng 43 Aug 29, 2022
Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database!

PostGraphile Instant lightning-fast GraphQL API backed primarily by your PostgreSQL database. Highly customisable and extensible thanks to incredibly

Graphile 11.7k Jan 4, 2023
The Blog system developed by nest.js based on node.js and the database orm used typeorm, the development language used TypeScript

考拉的 Nest 实战学习系列 readme 中有很多要说的,今天刚开源还没来及更新,晚些慢慢写,其实本人最近半年多没怎么写后端代码,主要在做低代码和中台么内容,操作的也不是原生数据库而是元数据Meta,文中的原生数据库操作也当作复习下,数据库的操作为了同时适合前端和Node开发小伙伴,所以并不是很

程序员成长指北 148 Dec 22, 2022
Node.js client for the Aerospike database

Aerospike Node.js Client An Aerospike add-on module for Node.js. The client is compatible with Node.js v8.x, v10.x (LTS), v12.x (LTS), and v14.x (LTS)

Aerospike 198 Dec 30, 2022
Common Database Interface for Node

database-js Wrapper for multiple databases with a JDBC-like connection Database-js implements a common, promise-based interface for SQL database acces

null 57 Dec 3, 2022