Skip to content

Commit

Permalink
Remove warnings about deprecations
Browse files Browse the repository at this point in the history
These deprecations happened over a year ago.
  • Loading branch information
wooorm committed Jul 25, 2015
1 parent 2801fbc commit 6561765
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 61 deletions.
38 changes: 8 additions & 30 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* @author Titus Wormer
* @copyright 2014-2015 Titus Wormer. All rights reserved.
* @module retext
* @fileoverview Extensible system for analysing and manipulating
* natural language.
*/

'use strict';

/*
Expand Down Expand Up @@ -70,17 +78,6 @@ Retext.prototype.use = function (plugin, options) {
);
}

if (typeof plugin.attach === 'function') {
throw new TypeError(
'Illegal invocation: `' + plugin + '` ' +
'is not a valid argument for ' +
'`Retext#use(plugin)`.\n' +
'This breaking change, the removal of ' +
'`attach`, occurred in 0.3.0-rc.2, see ' +
'GitHub for more information.'
);
}

/*
* Ware does not know which plugins are attached,
* only which `onrun` methods are. Thus, we have
Expand Down Expand Up @@ -122,15 +119,6 @@ Retext.prototype.parse = function (value, options, done) {
options = null;
}

if (typeof done !== 'function') {
throw new TypeError(
'Illegal invocation: `' + done + '` ' +
'is not a valid argument for `Retext#parse(value, done)`.\n' +
'This breaking change occurred in 0.2.0-rc.1, see GitHub for ' +
'more information.'
);
}

nlcst = self.parser.parse(value);

self.run(nlcstToTextOM(self.TextOM, nlcst), options, done);
Expand Down Expand Up @@ -158,16 +146,6 @@ Retext.prototype.run = function (node, options, done) {
options = null;
}

if (typeof done !== 'function') {
throw new TypeError(
'Illegal invocation: `' + done + '` ' +
'is not a valid argument for ' +
'`Retext#run(node, done)`.\n' +
'This breaking change occurred in 0.2.0-rc.1, see GitHub for ' +
'more information.'
);
}

self.ware.run(node, options, done);

return self;
Expand Down
38 changes: 8 additions & 30 deletions retext.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Retext = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/**
* @author Titus Wormer
* @copyright 2014-2015 Titus Wormer. All rights reserved.
* @module retext
* @fileoverview Extensible system for analysing and manipulating
* natural language.
*/

'use strict';

/*
Expand Down Expand Up @@ -71,17 +79,6 @@ Retext.prototype.use = function (plugin, options) {
);
}

if (typeof plugin.attach === 'function') {
throw new TypeError(
'Illegal invocation: `' + plugin + '` ' +
'is not a valid argument for ' +
'`Retext#use(plugin)`.\n' +
'This breaking change, the removal of ' +
'`attach`, occurred in 0.3.0-rc.2, see ' +
'GitHub for more information.'
);
}

/*
* Ware does not know which plugins are attached,
* only which `onrun` methods are. Thus, we have
Expand Down Expand Up @@ -123,15 +120,6 @@ Retext.prototype.parse = function (value, options, done) {
options = null;
}

if (typeof done !== 'function') {
throw new TypeError(
'Illegal invocation: `' + done + '` ' +
'is not a valid argument for `Retext#parse(value, done)`.\n' +
'This breaking change occurred in 0.2.0-rc.1, see GitHub for ' +
'more information.'
);
}

nlcst = self.parser.parse(value);

self.run(nlcstToTextOM(self.TextOM, nlcst), options, done);
Expand Down Expand Up @@ -159,16 +147,6 @@ Retext.prototype.run = function (node, options, done) {
options = null;
}

if (typeof done !== 'function') {
throw new TypeError(
'Illegal invocation: `' + done + '` ' +
'is not a valid argument for ' +
'`Retext#run(node, done)`.\n' +
'This breaking change occurred in 0.2.0-rc.1, see GitHub for ' +
'more information.'
);
}

self.ware.run(node, options, done);

return self;
Expand Down
2 changes: 1 addition & 1 deletion retext.min.js

Large diffs are not rendered by default.

0 comments on commit 6561765

Please sign in to comment.