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) 301 B
var toString = require('../lang/toString'); /** * Checks if string starts with specified prefix. */ function startsWith(str, prefix) { str = toString(str); prefix = toString(prefix); return str.indexOf(prefix) === 0; } module.exports = startsWith;