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

20 lines (16 loc) 484 B
define(['../array/forEach', '../array/slice', './forOwn'], function (forEach, slice, forOwn) { /** * Copy missing properties in the obj from the defaults. */ function fillIn(obj, var_defaults){ forEach(slice(arguments, 1), function(base){ forOwn(base, function(val, key){ if (obj[key] == null) { obj[key] = val; } }); }); return obj; } return fillIn; });