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

datafield

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datafield - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

11

package.json

@@ -11,3 +11,12 @@ {

],
"version": "0.1.0",
"homepage": "https://tomkallen.github.io/datafield/",
"repository": {
"type" : "git",
"url" : "https://github.com/tomkallen/datafield.git"
},
"bugs": {
"url": "https://github.com/tomkallen/datafield/issues",
"email": "comradebykoff@gmail.com"
},
"version": "0.1.1",
"description": "Sort, select, filter, evaluate and perform maths on your arrays of data",

@@ -14,0 +23,0 @@ "main": "./dist/datafield.min.js",

11

readme.md

@@ -7,2 +7,3 @@ ### DataField

[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![npm version](https://badge.fury.io/js/datafield.svg)](https://badge.fury.io/js/datafield)

@@ -18,3 +19,3 @@

`{
{
"_id": "5b420ae94fe6464ff91f5de8",

@@ -37,3 +38,3 @@ "index": 0,

"friends": [{"id": 0, "name": "Whitney Snow"}, {"id": 1, "name": "Garza Hernandez"}, {"id": 2,"name": "Lourdes Conley"}]
}`
}

@@ -47,3 +48,3 @@

Now your data is stored within an instance of DataField class.
Now your data is stored in an instance of DataField class.

@@ -57,3 +58,3 @@ Each method that performs any kind of selection or filtering returns a **new instance** of DataField and can be chained.

Lets filter our data. We need users who are 30 years old or older, but not 41 years old and have at least 2 friends, but less than 10. Also we want our list sorted by last name _(library can work with nested props)_ in descending order. Then we are done so we want an array out of that:
Lets filter our data. We need users who are 30 years old or older, but not 41 years old and have at least 2 friends, but less than 10. Also we want our list sorted by last name in descending order. Then we are done so we want an array out of that:

@@ -65,2 +66,2 @@ users.where('age').gte(30).not(41).where('friends').range(2, 10).sort({by: 'name.last', order: 'desc'}).toArray()

`npm install datafield`
`npm i datafield`

Sorry, the diff of this file is not supported yet

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