Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
molarmanful committed Jan 2, 2016
1 parent 258771a commit f299016
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/interpreter.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h2 id="let-s-get-started-">Let’s get started!</h2>

</div>

<div class="content"><div class='highlight'><pre>[<span class="hljs-built_in">String</span>,<span class="hljs-built_in">Array</span>,<span class="hljs-built_in">Number</span>,<span class="hljs-built_in">Object</span>,<span class="hljs-built_in">RegExp</span>,<span class="hljs-built_in">Date</span>,s,_,XRegExp,<span class="hljs-built_in">Function</span>].map(v=&gt;<span class="hljs-built_in">Object</span>.getOwnPropertyNames(v).map((x,y)=&gt;v.prototype[<span class="hljs-built_in">String</span>.fromCharCode(y+<span class="hljs-number">248</span>)]=v.prototype[x]));</pre></div></div>
<div class="content"><div class='highlight'><pre>[<span class="hljs-built_in">String</span>,<span class="hljs-built_in">Array</span>,<span class="hljs-built_in">Number</span>,<span class="hljs-built_in">Object</span>,<span class="hljs-built_in">RegExp</span>,<span class="hljs-built_in">Date</span>,s,_,XRegExp,<span class="hljs-built_in">Function</span>].map(v=&gt;<span class="hljs-built_in">Object</span>.getOwnPropertyNames(v.prototype).map((x,y)=&gt;v.prototype[<span class="hljs-built_in">String</span>.fromCharCode(y+<span class="hljs-number">248</span>)]=v.prototype[x]));</pre></div></div>

</li>

Expand Down
2 changes: 1 addition & 1 deletion interpreter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
math.import(numbers,{wrap:true,silent:true});

//prototype-based function aliasing
[String,Array,Number,Object,RegExp,Date,s,_,XRegExp,Function].map(v=>Object.getOwnPropertyNames(v).map((x,y)=>v.prototype[String.fromCharCode(y+248)]=v.prototype[x]));
[String,Array,Number,Object,RegExp,Date,s,_,XRegExp,Function].map(v=>Object.getOwnPropertyNames(v.prototype).map((x,y)=>v.prototype[String.fromCharCode(y+248)]=v.prototype[x]));
//object-based function aliasing
[math,String,Array,Number,Object,JSON,RegExp,XRegExp,Date,_,s,window,Function].map(v=>Object.getOwnPropertyNames(v).map((x,y)=>v[String.fromCharCode(y+248)]=v[x]));
//function alias helper: use as `alias(Array,METHOD_NAME_STRING)`
Expand Down

0 comments on commit f299016

Please sign in to comment.