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

23 lines (18 loc) 464 B
define(['../function/makeIterator_'], function (makeIterator) { /** * Array map */ function map(arr, callback, thisObj) { callback = makeIterator(callback, thisObj); var results = []; if (arr == null){ return results; } var i = -1, len = arr.length; while (++i < len) { results[i] = callback(arr[i], i, arr); } return results; } return map; });