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

18 lines (12 loc) 313 B
var toArray = require('./toArray'); var find = require('../array/find'); /** * Return first non void argument */ function defaults(var_args){ return find(toArray(arguments), nonVoid); } function nonVoid(val){ return val != null; } module.exports = defaults;