UNPKG

tastypie

Version:

Tastypie is a webservice API framework for Node.js based on Django's Tastypie Framework. It provides a convenient, yet powerful and highly customizable, abstraction for creating REST-style interfaces

21 lines (17 loc) 505 B
define(['./forOwn'], function (forOwn) { /** * checks if a object contains all given properties/values */ function matches(target, props){ // can't use "object/every" because of circular dependency var result = true; forOwn(props, function(val, key){ if (target[key] !== val) { // break loop at first difference return (result = false); } }); return result; } return matches; });