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

22 lines (17 loc) 490 B
var forOwn = require('./forOwn'); var makeIterator = require('../function/makeIterator_'); /** * Object some */ function some(obj, callback, thisObj) { callback = makeIterator(callback, thisObj); var result = false; forOwn(obj, function(val, key) { if (callback(val, key, obj)) { result = true; return false; // break } }); return result; } module.exports = some;