From c5fed508813422629835d1bad79e5db757fb4e02 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Tue, 21 Apr 2015 17:23:43 +0430 Subject: [PATCH] fix: typo constats.js -> constants.js --- dist/{constats.js => constants.js} | 0 dist/index.js | 3 +- equation.js | 5 +- equation.min.js | 2 +- lib/{constats.js => constants.js} | 0 lib/index.js | 2 +- npm-debug.log | 100 ----------------------------- 7 files changed, 5 insertions(+), 107 deletions(-) rename dist/{constats.js => constants.js} (100%) rename lib/{constats.js => constants.js} (100%) delete mode 100644 npm-debug.log diff --git a/dist/constats.js b/dist/constants.js similarity index 100% rename from dist/constats.js rename to dist/constants.js diff --git a/dist/index.js b/dist/index.js index 298d60a..d772cb6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -18,7 +18,7 @@ var _operators = require('./operators'); var _operators2 = _interopRequireWildcard(_operators); -var _constants = require('./constats'); +var _constants = require('./constants'); var _constants2 = _interopRequireWildcard(_constants); @@ -116,7 +116,6 @@ var solveStack = (function (_solveStack) { return solveStack; })(function (stack) { - // $0(stack); if (stack.some(Array.isArray)) { stack = stack.map(function (group) { if (!Array.isArray(group)) { diff --git a/equation.js b/equation.js index c28cef7..fe93f70 100644 --- a/equation.js +++ b/equation.js @@ -195,7 +195,7 @@ var _operators = require('./operators'); var _operators2 = _interopRequireWildcard(_operators); -var _constants = require('./constats'); +var _constants = require('./constants'); var _constants2 = _interopRequireWildcard(_constants); @@ -293,7 +293,6 @@ var solveStack = (function (_solveStack) { return solveStack; })(function (stack) { - // $0(stack); if (stack.some(Array.isArray)) { stack = stack.map(function (group) { if (!Array.isArray(group)) { @@ -578,7 +577,7 @@ var replaceConstants = function replaceConstants(expression) { exports['default'] = Equation; module.exports = exports['default']; -},{"./constats":1,"./helpers":2,"./operators":4,"./readstream":5}],4:[function(require,module,exports){ +},{"./constants":1,"./helpers":2,"./operators":4,"./readstream":5}],4:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, '__esModule', { diff --git a/equation.min.js b/equation.min.js index 83d4c0c..4b635e5 100644 --- a/equation.min.js +++ b/equation.min.js @@ -1 +1 @@ -!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Equation=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gd;++d)c=c[c.length-1];return c};c.dive=g;var h=function(a){function b(b,c){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a,b){var c=void 0===arguments[2]?0:arguments[2];if(2>b)return{arr:a,index:c};var d=a.reduce(function(a,d,e){if(Array.isArray(d)){var f=h(d,b-1,e),g=f.arr,i=f.index,j=a.concat(g);return c=i,j}return a},[]);return{arr:d,index:c}});c.deep=h;var i=function(a){function b(b,c,d){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a,b,c){var d=[];if(!b.some(Array.isArray))return a[b[0]]=c,c;var e=!0,f=!1,g=void 0;try{for(var h,j=b[Symbol.iterator]();!(e=(h=j.next()).done);e=!0){var k=h.value;d.push(i(a,k,c))}}catch(l){f=!0,g=l}finally{try{!e&&j["return"]&&j["return"]()}finally{if(f)throw g}}return d});c.diveTo=i;var j=function(a){function b(b){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){return Array.isArray(a)&&a.some(Array.isArray)?a.reduce(function(a,b){return a.concat(j(b))},[]):a});c.flatten=j;var k=function(a){return a.toString().replace(/\W/g,"")};c.removeSymbols=k},{}],3:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a)){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}throw new TypeError("Invalid attempt to destructure non-iterable instance")},f=function(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);be;e++)d[e]=arguments[e];return a=a.replace(/[a-z]*/g,function(a){var b=c.indexOf(a);return b>-1?d[b]||0:a}),o.solve(a)}},registerOperator:function(a,b){j["default"][a]=b},registerConstant:function(a,b){l["default"][a]=b}},p=function(a){function b(b){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){return a.some(Array.isArray)?(a=a.map(function(a){return Array.isArray(a)?p(a):a}),p(a)):x(a)}),q=Object.keys(j["default"]).map(function(a){return j["default"][a].precedence}),r=Math.max.apply(Math,f(q)),s=Math.min.apply(Math,f(q)),t=function(a){for(var b=new h["default"](a),c=[],d="";b.next();){var e=b.current();" "!==e&&(n.isNumber(e)||j["default"][e]||"."===e?d.length?(c.push(d,e),d=""):n.isNumber(c[c.length-1])&&(n.isNumber(e)||"."===e)?c[c.length-1]+=e:c.push(e):d+=e)}return d.length&&c.push(d),u(c)},u=function(a){var b=0;return a.reduce(function(a,c){return c.indexOf("(")>-1?(c.length>1?n.dive(a,b).push(c.replace("(",""),[]):n.dive(a,b).push([]),b++):")"===c?b--:n.dive(a,b).push(c),a},[])},v=function(a){var b="string"==typeof a?j["default"][a]:a;if(!b)return null;var c=b.format.split("1"),d=c[0].length,e=c[1].length;return{left:d,right:e}},w=function(a){function b(b){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){var b=!0,c=!1,d=void 0;try{for(var f,g=a.entries()[Symbol.iterator]();!(b=(f=g.next()).done);b=!0){var h=e(f.value,2),i=h[0],k=h[1];Array.isArray(k)&&a.splice(i,1,w(k))}}catch(l){c=!0,d=l}finally{try{!b&&g["return"]&&g["return"]()}finally{if(c)throw d}}for(var m=s;r>=m;m++)for(var i=0;iu;u++)t=[t];i-=q}}return a}),x=function(a){var b,c=y(a);if(!c)return a[0];var d=v(c),e=d.left,g=a.slice(0,e),h=a.slice(e+1);return(b=j["default"][c]).fn.apply(b,f(g).concat(f(h)))},y=function(a){var b=!0,c=!1,d=void 0;try{for(var e,f=a[Symbol.iterator]();!(b=(e=f.next()).done);b=!0){var g=e.value;if("string"==typeof g)return g}}catch(h){c=!0,d=h}finally{try{!b&&f["return"]&&f["return"]()}finally{if(c)throw d}}return null},z=function(a){return a.replace(/[A-Z]*/g,function(a){var b=l["default"][a];return b?"function"==typeof b?b():b:a})};c["default"]=o,b.exports=c["default"]},{"./constats":1,"./helpers":2,"./operators":4,"./readstream":5}],4:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c["default"]={"^":{fn:function(a,b){return Math.pow(a,b)},format:"010",precedence:0},"*":{fn:function(a,b){return a*b},format:"010",precedence:1},"/":{fn:function(a,b){return a/b},format:"010",precedence:1},"%":{fn:function(a,b){return a%b},format:"010",precedence:1},"\\":{fn:function(a,b){return Math.floor(a/b)},format:"010",precedence:1},"+":{fn:function(a,b){return a+b},format:"010",precedence:2},"-":{fn:function(a,b){return a-b},format:"010",precedence:2},"!":{fn:function(a){for(var b=1,c=0;a>c;++c)b*=c;return b},format:"01",precedence:2},log:{fn:Math.log,format:"10",precedence:-1},ln:{fn:Math.log,format:"10",precedence:-1},lg:{fn:function(a){return Math.log(a)/Math.log(2)},format:"10",precedence:-1},sin:{fn:Math.sin,format:"10",precedence:-1},cos:{fn:Math.cos,format:"10",precedence:-1},tan:{fn:Math.tan,format:"10",precedence:-1},cot:{fn:Math.cot,format:"10",precedence:-1}},b.exports=c["default"]},{}],5:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c["default"]=function(a){var b=0,c=[];return{next:function(){return c.push(a[b]),b>=a.length?null:a[b++]},current:function(){return a[b-1]},index:function(){return b-1},to:function(c){var d="",e=b+c;for(b=b;e>b;++b)d+=[a[b]];return d},drain:function(){return c.splice(0,c.length)},replace:function(a){function b(b,c,d){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(c,d,e){var f=a.split("");f.splice(c,d,e),a=f.join(""),b-=d-c}),go:function(a){b+=a},all:function(){return a}}},b.exports=c["default"]},{}]},{},[3])(3)}); \ No newline at end of file +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Equation=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gd;++d)c=c[c.length-1];return c};c.dive=g;var h=function(a){function b(b,c){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a,b){var c=void 0===arguments[2]?0:arguments[2];if(2>b)return{arr:a,index:c};var d=a.reduce(function(a,d,e){if(Array.isArray(d)){var f=h(d,b-1,e),g=f.arr,i=f.index,j=a.concat(g);return c=i,j}return a},[]);return{arr:d,index:c}});c.deep=h;var i=function(a){function b(b,c,d){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a,b,c){var d=[];if(!b.some(Array.isArray))return a[b[0]]=c,c;var e=!0,f=!1,g=void 0;try{for(var h,j=b[Symbol.iterator]();!(e=(h=j.next()).done);e=!0){var k=h.value;d.push(i(a,k,c))}}catch(l){f=!0,g=l}finally{try{!e&&j["return"]&&j["return"]()}finally{if(f)throw g}}return d});c.diveTo=i;var j=function(a){function b(b){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){return Array.isArray(a)&&a.some(Array.isArray)?a.reduce(function(a,b){return a.concat(j(b))},[]):a});c.flatten=j;var k=function(a){return a.toString().replace(/\W/g,"")};c.removeSymbols=k},{}],3:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a)){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}throw new TypeError("Invalid attempt to destructure non-iterable instance")},f=function(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);be;e++)d[e]=arguments[e];return a=a.replace(/[a-z]*/g,function(a){var b=c.indexOf(a);return b>-1?d[b]||0:a}),o.solve(a)}},registerOperator:function(a,b){j["default"][a]=b},registerConstant:function(a,b){l["default"][a]=b}},p=function(a){function b(b){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){return a.some(Array.isArray)?(a=a.map(function(a){return Array.isArray(a)?p(a):a}),p(a)):x(a)}),q=Object.keys(j["default"]).map(function(a){return j["default"][a].precedence}),r=Math.max.apply(Math,f(q)),s=Math.min.apply(Math,f(q)),t=function(a){for(var b=new h["default"](a),c=[],d="";b.next();){var e=b.current();" "!==e&&(n.isNumber(e)||j["default"][e]||"."===e?d.length?(c.push(d,e),d=""):n.isNumber(c[c.length-1])&&(n.isNumber(e)||"."===e)?c[c.length-1]+=e:c.push(e):d+=e)}return d.length&&c.push(d),u(c)},u=function(a){var b=0;return a.reduce(function(a,c){return c.indexOf("(")>-1?(c.length>1?n.dive(a,b).push(c.replace("(",""),[]):n.dive(a,b).push([]),b++):")"===c?b--:n.dive(a,b).push(c),a},[])},v=function(a){var b="string"==typeof a?j["default"][a]:a;if(!b)return null;var c=b.format.split("1"),d=c[0].length,e=c[1].length;return{left:d,right:e}},w=function(a){function b(b){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){var b=!0,c=!1,d=void 0;try{for(var f,g=a.entries()[Symbol.iterator]();!(b=(f=g.next()).done);b=!0){var h=e(f.value,2),i=h[0],k=h[1];Array.isArray(k)&&a.splice(i,1,w(k))}}catch(l){c=!0,d=l}finally{try{!b&&g["return"]&&g["return"]()}finally{if(c)throw d}}for(var m=s;r>=m;m++)for(var i=0;iu;u++)t=[t];i-=q}}return a}),x=function(a){var b,c=y(a);if(!c)return a[0];var d=v(c),e=d.left,g=a.slice(0,e),h=a.slice(e+1);return(b=j["default"][c]).fn.apply(b,f(g).concat(f(h)))},y=function(a){var b=!0,c=!1,d=void 0;try{for(var e,f=a[Symbol.iterator]();!(b=(e=f.next()).done);b=!0){var g=e.value;if("string"==typeof g)return g}}catch(h){c=!0,d=h}finally{try{!b&&f["return"]&&f["return"]()}finally{if(c)throw d}}return null},z=function(a){return a.replace(/[A-Z]*/g,function(a){var b=l["default"][a];return b?"function"==typeof b?b():b:a})};c["default"]=o,b.exports=c["default"]},{"./constants":1,"./helpers":2,"./operators":4,"./readstream":5}],4:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c["default"]={"^":{fn:function(a,b){return Math.pow(a,b)},format:"010",precedence:0},"*":{fn:function(a,b){return a*b},format:"010",precedence:1},"/":{fn:function(a,b){return a/b},format:"010",precedence:1},"%":{fn:function(a,b){return a%b},format:"010",precedence:1},"\\":{fn:function(a,b){return Math.floor(a/b)},format:"010",precedence:1},"+":{fn:function(a,b){return a+b},format:"010",precedence:2},"-":{fn:function(a,b){return a-b},format:"010",precedence:2},"!":{fn:function(a){for(var b=1,c=0;a>c;++c)b*=c;return b},format:"01",precedence:2},log:{fn:Math.log,format:"10",precedence:-1},ln:{fn:Math.log,format:"10",precedence:-1},lg:{fn:function(a){return Math.log(a)/Math.log(2)},format:"10",precedence:-1},sin:{fn:Math.sin,format:"10",precedence:-1},cos:{fn:Math.cos,format:"10",precedence:-1},tan:{fn:Math.tan,format:"10",precedence:-1},cot:{fn:Math.cot,format:"10",precedence:-1}},b.exports=c["default"]},{}],5:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c["default"]=function(a){var b=0,c=[];return{next:function(){return c.push(a[b]),b>=a.length?null:a[b++]},current:function(){return a[b-1]},index:function(){return b-1},to:function(c){var d="",e=b+c;for(b=b;e>b;++b)d+=[a[b]];return d},drain:function(){return c.splice(0,c.length)},replace:function(a){function b(b,c,d){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(c,d,e){var f=a.split("");f.splice(c,d,e),a=f.join(""),b-=d-c}),go:function(a){b+=a},all:function(){return a}}},b.exports=c["default"]},{}]},{},[3])(3)}); \ No newline at end of file diff --git a/lib/constats.js b/lib/constants.js similarity index 100% rename from lib/constats.js rename to lib/constants.js diff --git a/lib/index.js b/lib/index.js index aba054f..282f750 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,6 +1,6 @@ import ReadStream from './readstream'; import operators from './operators'; -import constants from './constats'; +import constants from './constants'; import * as _ from './helpers'; let Equation = { diff --git a/npm-debug.log b/npm-debug.log deleted file mode 100644 index fa21c44..0000000 --- a/npm-debug.log +++ /dev/null @@ -1,100 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ 'node', '/usr/local/bin/npm', 'publish' ] -2 info using npm@2.5.1 -3 info using node@v0.12.0 -4 verbose node symlink /usr/local/bin/node -5 verbose publish [ '.' ] -6 silly cache add args [ '.', null ] -7 verbose cache add spec . -8 silly cache add parsed spec { raw: '.', -8 silly cache add scope: null, -8 silly cache add name: null, -8 silly cache add rawSpec: '.', -8 silly cache add spec: '/Users/mahdi/Documents/Workshop/equation', -8 silly cache add type: 'directory' } -9 verbose addLocalDirectory /Users/mahdi/.npm/equations/1.0.1/package.tgz not in flight; packing -10 verbose tar pack [ '/Users/mahdi/.npm/equations/1.0.1/package.tgz', -10 verbose tar pack '/Users/mahdi/Documents/Workshop/equation' ] -11 verbose tarball /Users/mahdi/.npm/equations/1.0.1/package.tgz -12 verbose folder /Users/mahdi/Documents/Workshop/equation -13 info prepublish equations@1.0.1 -14 verbose addLocalTarball adding from inside cache /Users/mahdi/.npm/equations/1.0.1/package.tgz -15 silly cache afterAdd equations@1.0.1 -16 verbose afterAdd /Users/mahdi/.npm/equations/1.0.1/package/package.json not in flight; writing -17 verbose afterAdd /Users/mahdi/.npm/equations/1.0.1/package/package.json written -18 silly publish { name: 'equations', -18 silly publish version: '1.0.1', -18 silly publish description: 'Equation ======== Solve math expressions or create equations for repeated and complex Math tasks.', -18 silly publish main: 'dist/index.js', -18 silly publish directories: { test: 'dist/tests' }, -18 silly publish scripts: { test: 'grunt test' }, -18 silly publish keywords: [ 'Math', 'JavaScript' ], -18 silly publish author: { name: 'Mahdi Dibaiee' }, -18 silly publish license: 'MIT', -18 silly publish devDependencies: -18 silly publish { browserify: '^9.0.8', -18 silly publish grunt: '^0.4.5', -18 silly publish 'grunt-babel': '^5.0.0', -18 silly publish 'grunt-browserify': '^3.7.0', -18 silly publish 'grunt-contrib-uglify': '^0.9.1', -18 silly publish 'grunt-contrib-watch': '^0.6.1', -18 silly publish 'grunt-eslint': '^11.0.0', -18 silly publish 'grunt-mocha-test': '^0.12.7', -18 silly publish mocha: '^2.2.4' }, -18 silly publish readme: 'Equation\n========\nSolve math expressions or create equations for repeated and complex Math tasks.\n\nTo use in browser, download [`equation.min.js`](https://raw.githubusercontent.com/mdibaiee/Equation.js/master/equation.min.js).\n\nInstall using npm:\n\n```\nnpm install equations\n```\n\n####Examples:\n\n```javascript\n// solve\nconsole.log(Equation.solve(\'4 * lg(4) ^ 3\')); // 32\n\n// equation\nlet sphereArea = Equation.equation(\'4 * PI * r^2\');\n\nconsole.log(sphereArea(5)); // 314.1592653589793\n```\n\nYou can also register your own operators and constants.\n\n```javascript\n// these options are explained below\nEquation.registerOperator(\'$\', {\n fn: a => 1/a,\n format: \'10\',\n precedence: 2\n});\n\nEquation.solve(\'$2\'); // 0.5\nEquation.solve(\'$5\'); // 0.2\n\nEquation.registerConstant(\'N\', () => {\n return Math.random() * 10 + 10\n});\n\nEquation.solve(\'N\'); // a number between 10 and 20\n```\n\nFor a list of operators and constants see `[operators.js](https://github.com/mdibaiee/Equation.js/blob/master/lib/operators.js)` and `[constants.js](https://github.com/mdibaiee/Equation.js/blob/master/lib/constants.js)`.\n\nAPI\n===\n####solve(expression: String)\nTakes a math expression and evaluates it, returning the result.\n\n####equation(expression: String)\nTakes a math expression containing variables, returning a function which\nreplaces the variables with given arguments, and solves the expression.\n\n####registerOperator(key: String, options: Object)\nRegisters a new operator.\n\nOptions:\n\n#####fn\n The function which is run on arguments and returns the result\n#####format\n The format which specifies how arguments are placed relative to operator, this is a string in which 1 represents the operator and zeroes represent arguments.\n\n For example `+` has the format `010` and factorial has `01`.\n#####precedence\n Specifies the precedence of operator. The less the value, the higher the precedence, resulting in sooner execution.\n\n####registerConstant(key: String, value: Function/Number)\nRegisters a new constant. value can be a function (takes no arguments), or a constant number.\n\nThat\'s right, we have named these *constants* but they actually can change, that\'s why we can use functions to define them. An example is the `RAND` constant which calls `Math.random`.\n\nContributing\n============\nThe code is commented and I hope you don\'t have a hard time contributing,\nanyway, some tips about contributing:\n\nThe source code is in `lib` directory and is then transpiled into `dist`.\n\n#####Grunt Tasks\n######default\nTranspiles `lib` to `dist`\n######build\nTranspiles, browserifies, uglifies\n######eslint\nRuns ESLint on `lib` and `tests`\n######test\nRuns the tests\n\n---\nPlease make sure to run `grunt eslint` before commiting.\n\nIf you\'re adding something new, please add a test, too.\n', -18 silly publish readmeFilename: 'README.md', -18 silly publish gitHead: '0970f7eb2bfcad4c474f50616cb49430b3f5fc6d', -18 silly publish _id: 'equations@1.0.1', -18 silly publish _shasum: '16a7f64cfbb8232d8babeee9419029def2aa6f44', -18 silly publish _from: '.' } -19 silly mapToRegistry name equations -20 silly mapToRegistry using default registry -21 silly mapToRegistry registry https://registry.npmjs.org/ -22 silly mapToRegistry uri https://registry.npmjs.org/equations -23 verbose publish registryBase https://registry.npmjs.org/ -24 silly publish uploading /Users/mahdi/.npm/equations/1.0.1/package.tgz -25 verbose request uri https://registry.npmjs.org/equations -26 verbose request sending authorization for write operation -27 info attempt registry request try #1 at 17:00:50 -28 verbose request using bearer token for auth -29 verbose request id cee8b60a55a1f3ce -30 http request PUT https://registry.npmjs.org/equations -31 http 403 https://registry.npmjs.org/equations -32 verbose headers { date: 'Tue, 21 Apr 2015 12:30:43 GMT', -32 verbose headers server: 'Apache', -32 verbose headers 'content-type': 'application/json', -32 verbose headers 'cache-control': 'max-age=60', -32 verbose headers 'content-length': '95', -32 verbose headers 'accept-ranges': 'bytes', -32 verbose headers via: '1.1 varnish', -32 verbose headers 'x-served-by': 'cache-fra1246-FRA', -32 verbose headers 'x-cache': 'MISS', -32 verbose headers 'x-cache-hits': '0', -32 verbose headers 'x-timer': 'S1429619442.117266,VS0,VE919', -32 verbose headers 'keep-alive': 'timeout=10, max=50', -32 verbose headers connection: 'Keep-Alive' } -33 verbose request invalidating /Users/mahdi/.npm/registry.npmjs.org/equations on PUT -34 error publish Failed PUT 403 -35 verbose stack Error: "You cannot publish over the previously published version 1.0.1." : equations -35 verbose stack at CachingRegistryClient. (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:254:14) -35 verbose stack at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:178:14) -35 verbose stack at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:344:22) -35 verbose stack at Request.emit (events.js:110:17) -35 verbose stack at Request. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1239:14) -35 verbose stack at Request.emit (events.js:129:20) -35 verbose stack at IncomingMessage. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1187:12) -35 verbose stack at IncomingMessage.emit (events.js:129:20) -35 verbose stack at _stream_readable.js:908:16 -35 verbose stack at process._tickCallback (node.js:355:11) -36 verbose statusCode 403 -37 verbose pkgid equations -38 verbose cwd /Users/mahdi/Documents/Workshop/equation -39 error Darwin 14.3.0 -40 error argv "node" "/usr/local/bin/npm" "publish" -41 error node v0.12.0 -42 error npm v2.5.1 -43 error code E403 -44 error "You cannot publish over the previously published version 1.0.1." : equations -45 error If you need help, you may report this error at: -45 error -46 verbose exit [ 1, true ]