Skip to content
Browse files

Remove unnecessary examples.

  • Loading branch information...
1 parent 4536170 commit 06967b506ba25644233713b8ff44223ee8905532 @dervus dervus committed
Showing with 0 additions and 65 deletions.
  1. +0 −37 examples/custom_type_new_20x.js
  2. +0 −28 examples/custom_type_old_1xx.js
View
37 examples/custom_type_new_20x.js
@@ -1,37 +0,0 @@
-// JS-YAML 2.0.x
-'use strict';
-
-
-var yaml = require('../lib/js-yaml');
-
-
-var cookiesType = new yaml.Type('!cookies', {
- loader: {
- kind: 'array',
- resolver: function (array /*, explicit*/) {
- var index, length;
-
- for (index = 0, length = array.length; index < length; index += 1) {
- array[index] = 'A ' + array[index] + ' with some cookies!';
- }
-
- return array;
- }
- }
-});
-
-
-var COOKIES_SCHEMA = new yaml.Schema({
- include: [ yaml.DEFAULT_SCHEMA ],
- explicit: [ cookiesType ]
-});
-
-
-console.log(yaml.load('!cookies [ coffee, tea, milk ]', { schema: COOKIES_SCHEMA }));
-
-
-// Output:
-//==============================================================================
-// [ 'A coffee with some cookies!',
-// 'A tea with some cookies!',
-// 'A milk with some cookies!' ]
View
28 examples/custom_type_old_1xx.js
@@ -1,28 +0,0 @@
-// JS-YAML version 1.x.x (deprecated)
-'use strict';
-
-
-var yaml = require('../lib/js-yaml');
-
-
-yaml.addConstructor('!cookies', function (node) {
- var array, index, length;
-
- array = this.constructSequence(node);
-
- for (index = 0, length = array.length; index < length; index += 1) {
- array[index] = 'A ' + array[index] + ' with some cookies!';
- }
-
- return array;
-});
-
-
-console.log(yaml.load('!cookies [ coffee, tea, milk ]'));
-
-
-// Output:
-//==============================================================================
-// [ 'A coffee with some cookies!',
-// 'A tea with some cookies!',
-// 'A milk with some cookies!' ]

0 comments on commit 06967b5

Please sign in to comment.
Something went wrong with that request. Please try again.