On Feb 15, 2013, at 20:42, David Heller wrote:
> I have the following code snippets
>
> this.m_names[] = name;
> this.m_rules[name] = {rule};
>
> this.m_rules[name][] = rule;
> return GLOBALS[name]; same as exports.name[] ???
>
> I'm porting some php code that I did not write.
The above code appears to be mid-conversion. It might help if you showed the
working PHP code so we could help you convert it properly.
In PHP code, "[]" after an array variable name should probably be converted to
the JavaScript .push() Array method.
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/push
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.