Skip to content

Commit

Permalink
Merge pull request #4 from lucono/feature/custom_validated_types
Browse files Browse the repository at this point in the history
Custom type refinements
  • Loading branch information
lucono committed Jul 27, 2015
2 parents ff8c8c2 + 59817f5 commit 5386fef
Show file tree
Hide file tree
Showing 7 changed files with 166 additions and 410 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -101,4 +101,4 @@ MIT license.

Visit the website for usage guide, examples, API docs, and installation.

#### **[xtype.js.org](http://xtype.js.org/)**
**[xtype.js.org](http://xtype.js.org/)**
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "xtypejs",
"version": "0.4.2",
"version": "0.5.0",
"homepage": "http://xtype.js.org",
"description": "Elegant, highly efficient data validation for JavaScript Apps.",
"main": "dist/xtype.js",
Expand Down
259 changes: 0 additions & 259 deletions docs/CustomTypesSupport.md

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "xtypejs",
"version": "0.4.2",
"version": "0.5.0",
"description": "Elegant, highly efficient data validation for JavaScript Apps.",
"main": "dist/xtype",
"keywords": [
Expand Down
1 change: 0 additions & 1 deletion test/assets/xtype.css
Expand Up @@ -22,7 +22,6 @@ body {
padding: 10px 30px 20px 30px;
border-bottom: #69c 5px solid;
margin-bottom: 8px;
white-space: nowrap;
}

.top-section a {
Expand Down
8 changes: 4 additions & 4 deletions test/spec/xtypejs-spec.js
Expand Up @@ -1665,7 +1665,7 @@
describe('Registering a custom type', function() {

beforeEach(function() {
xtype.registerTypes({
xtype.ext.registerType({
non_negative_integer: {
typeId: (xtype.NON_NEGATIVE_NUMBER & xtype.INTEGER),
compactName: '-int-'
Expand All @@ -1692,7 +1692,7 @@
}
});

xtype.registerTypes({
xtype.ext.registerType({
num_instance_custom_type_combo: {
definition: 'non_negative_integer, instance_type, two_prop_obj_custom_type',
compactName: 'num_inst_cust_combo'
Expand Down Expand Up @@ -1900,7 +1900,7 @@
it('should throw an exception if the name of the custom type conflicts with that of an existing type', function() {

expect(function() {
xtype.registerTypes({
xtype.ext.registerType({
number: (xtype.NON_POSITIVE_NUMBER & xtype.INTEGER)
});
}).toThrow();
Expand All @@ -1910,7 +1910,7 @@
it('should throw an exception if the compact name of the custom type conflicts that of an existing type', function() {

expect(function() {
xtype.registerTypes({
xtype.ext.registerType({
non_neg_int: {
typeId: (xtype.NON_NEGATIVE_NUMBER & xtype.INTEGER),
compactName: 'int+'
Expand Down

0 comments on commit 5386fef

Please sign in to comment.