New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

firemodel

Package Overview
Dependencies
Maintainers
2
Versions
381
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firemodel - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

lib/base-schema.d.ts

89

package.json
{
"name": "firemodel",
"version": "0.5.0",
"description": "Data models for Firebase",
"main": "firemodel.js",
"version": "0.6.0",
"description": "firemodel",
"license": "MIT",
"repository": "https://github.com/forest-fire/firemodel",
"author": "Ken Snyder <ken@ken.net>",
"keywords": ["serverless", "typescript"],
"files": ["lib"],
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"scripts": {
"test": "gulp test"
"clean": "rimraf lib",
"lint": "tslint --force --format verbose \"src/**/*.ts\"",
"build": "ts-node ./scripts/build.ts",
"test": "ts-node ./scripts/test.ts ",
"coverage":
"nyc --reporter=text --reporter=html mocha --compilers ts:ts-node/register",
"watch": "ts-node ./scripts/watch.ts",
"watch:test": "ts-node ./scripts/watch.ts test",
"watch:all": "ts-node ./scripts/watch.ts all",
"deploy": "ts-node ./scripts/deploy.ts ",
"cli": "ts-node cli/index.ts --"
},
"repository": {
"type": "git",
"url": "git+git@github.com:kshunz/firemodel.git"
"dependencies": {
"common-types": "^1.4.2",
"lodash": "^4.17.4",
"moment": "^2.0.0",
"pluralize": "^7.0.0",
"reflect-metadata": "^0.1.10",
"serialized-query": "^0.2.6",
"typed-conversions": "^0.7.3"
},
"keywords": [
"model",
"firebase",
"mvc",
"database"
],
"author": "Dwayne Ford",
"license": "ISC",
"devDependencies": {
"chai": "^3.5.0",
"gulp": "^3.9.1",
"gulp-bump": "^2.1.0",
"gulp-mocha": "^2.2.0",
"gulp-task-listing": "^1.0.1",
"gulp-util": "^3.0.7",
"mockfirebase": "^0.12.0",
"proxyquire": "^1.7.4",
"sinon": "^1.17.3"
"@types/chai": "^3.0.0",
"@types/chalk": "^0.4.31",
"@types/chance": "^0.7.33",
"@types/faker": "^4.1.0",
"@types/js-yaml": "^3.9.0",
"@types/lodash": "^4.0.0",
"@types/mocha": "^2.2.41",
"@types/node": "^6.0.0",
"@types/pluralize": "^0.0.27",
"@types/rimraf": "^0.0.28",
"@types/shelljs": "^0.7.1",
"@types/stack-trace": "^0.0.28",
"abstracted-admin": "^0.7.1",
"chai": "^4.0.0",
"chalk": "^2.0.0",
"chance": "^1.0.0",
"coveralls": "^2.0.0",
"faker": "^4.1.0",
"firemock": "^0.13.1",
"gitbook-plugin-favicon": "^0.0.2",
"js-yaml": "^3.0.0",
"mocha": "^3.4.0",
"nyc": "^11.0.0",
"prettier": "^1.5.2",
"rimraf": "^2.0.0",
"shelljs": "^0.7.0",
"stack-trace": "^0.0.10",
"test-console": "^1.0.0",
"ts-node": "^3.1.0",
"tslint": "^5.0.0",
"tslint-config-prettier": "^1.1.0",
"typescript": "^2.6.2"
},
"dependencies": {
"firebase": "^2.4.2",
"lodash": "^4.11.2"
"engines": {
"node": ">=6.0.0"
}
}

@@ -1,129 +0,51 @@

# FIREMODEL
Powerful Model Support for Firebase
![logo](docs/images/logo.jpg)
## HELP
--------
> A Modeling abstraction for Firebase Applications
This package is only days old. Tests still need to be written and many things may not work yet. Please use at your own risk and share bugs and issues on github. I'll try to fix things ASAP
## Description
#### [https://github.com/kshunz/firemodel/issues](https://github.com/kshunz/firemodel/issues)
--------
A library to:
## Getting Started
- Define database schemas in Typescript and target NodeJS or client-run JS
- Use structured/typed data knowledge to interact with a Firebase database
- Leverages the `firemock` library to use mocking easily and effectively (with auto-sensing type mock generation)
- Optionally use Redux integration for dispatch and/or actions
### node.js Installation
## Installation
````bash
npm install --save firebase firemodel
````
````js
var Firebase = require('firebase');
var firemodel = require('firemodel');
````
```sh
npm install firemodel
# or
yarn add firemodel
```
## Documentation
### Web Installation
Documentation can be found at: [http://www.firemodel.info](http://www.firemodel.info). If your reading on a mobile device, be sure to use the hamburger menu at the top for the table of contents.
````bash
bower install --save firemodel
## Contributing
````
I have developed this module selfishly for my own needs but as with all my other open-source work I'd be happy to recieve PR's and issues. Not surprisingly, PR's are my preference but sometimes people don't feel they have the right skills or time to fix something they feel is broken so raising issues is a nice way to communicate something you've noticed. I can't promise issues will always get immediate attention but I will get back as soon as I can.
### Setup
## License
<span style="font-family: monospace">
Copyright (c) 2017 LifeGadget Ltd
------------
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
````js
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
firemodel(Firebase); //--> adds "model" to the prototype
var ref = new Firebase('https://...');
````
### Using a Model
````js
var Member = ref.model('members');
Member.set('kshunz.active', true);
Member.set('kshunz.name.first', 'K.');
Member.set('kshunz.name.last', 'Shunz');
Member.save();
````
#### Query API
-----------
Getter
````js
Member.get('kshunz');
Member.results.first();
````
Find (unique filter STRING, field filters ARRAY of STRING)
````js
Member.find(); //--> find all member records
Member.find(['username']); //--> find all member username
Member.results.all();
````
Find (unique filter STRING, field filters ARRAY of STRING)
````js
Member.find('kshunz', ['username']);
Member.results.first(); //--> 'kshunz'
````
````js
Member.find('kshunz');
Member.results.first(); //--> returns entire {}
````
#### DAVIE (delete, add, view, index, edit) API
---------
[D]elete
````js
Member.delete('kshunz');
Member.save();
````
[A]dd
````js
Member.add({
kshunz: {
username: 'kshunz',
email: 'info@kshunz.com'
}
});
Member.save();
````
[V]iew
````js
Member.view('kshunz');
var currentMember = Member.results.first();
````
[I]ndex
````js
Member.index();
Member.results.all(); //returns all members
````
[E]dit
````js
Member.edit('kshunz.username', 'kshunz-admin');
Member.save();
````
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</span>

Sorry, the diff of this file is not supported yet

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