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

14 lines (10 loc) 283 B
define(['../string/lpad', '../lang/toNumber'], function(lpad, toNumber){ /** * Add padding zeros if n.length < minLength. */ function pad(n, minLength, char){ n = toNumber(n); return lpad(''+ n, minLength, char || '0'); } return pad; });