Nodejs 验证器 revalidator
- 授权协议: Apache
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/flatiron/revalidator
- 软件文档: https://github.com/flatiron/revalidator/blob/master/README.md
软件介绍
revalidator 是一款跨浏览器的 Node.js 验证器,是 resourceful 和 flatiron 正在使用的验证器。
示例
revalidator 的核心是很简单和简洁的: revalidator.validate(obj, schema):
var revalidator = require('revalidator');
console.dir(revalidator.validate(someObject, {
properties: {
url: {
description: 'the url the object should be stored at',
type: 'string',
pattern: '^/[^#%&*{}\\:<>?\/+]+$',
required: true
},
challenge: {
description: 'a means of protecting data (insufficient for production, used as example)',
type: 'string',
minLength: 5
},
body: {
description: 'what to store at the url',
type: 'any',
default: null
}
}
}));
The Pragmatic Programmer
Andrew Hunt、David Thomas / Addison-Wesley Professional / 1999-10-30 / USD 49.99
本书直击编程陈地,穿过了软件开发中日益增长的规范和技术藩篱,对核心过程进行了审视――即根据需求,创建用户乐于接受的、可工作和易维护的代码。本书包含的内容从个人责任到职业发展,直至保持代码灵活和易于改编重用的架构技术。从本书中将学到防止软件变质、消除复制知识的陷阱、编写灵活、动态和易适应的代码、避免出现相同的设计、用契约、断言和异常对代码进行防护等内容。一起来看看 《The Pragmatic Programmer》 这本书的介绍吧!
