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 (11 loc) 345 B
var toString = require('../lang/toString'); var lowerCase = require('./lowerCase'); var upperCase = require('./upperCase'); /** * UPPERCASE first char of each word. */ function properCase(str){ str = toString(str); return lowerCase(str).replace(/^\w|\s\w/g, upperCase); } module.exports = properCase;