locutusjs / locutus

Bringing stdlibs of other programming languages to JavaScript for educational purposes

Home Page:https://locutus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid syntax '/php/_helpers/_bc' in released '_locutus_shared/_locutus_shared_bc.js'

chihsuan opened this issue · comments

  • Have you checked the guidelines in our Contributing document?

Description

An invalid JS syntax found in the released '_locutus_shared/_locutus_shared_bc.js' line 6:

To reproduce:

  1. npm install locutus
  2. Open node_modules/locutus/php/_locutus_shared/_locutus_shared_bc.js
1 'use strict';
2
3 module.exports = function _bc() {
4   // eslint-disable-line camelcase
5   //  discuss at: http://locutus.io
6 /php/_helpers/_bc

I think somehow an additional newline is added to the line 5.

Version: locutus@2.0.16
OS: MacOS

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 14 days.

When I try this locally, the new location is node_modules/locutus/php/_helpers/_bc.js and it seems to not suffer from this:

'use strict';

module.exports = function _bc() {
  //  discuss at: https://locutus.io/php/_helpers/_bc
  // original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
  // improved by: Brett Zamir (https://brett-zamir.me)
  //   example 1: var $bc = _bc()
  //   example 1: var $result = $bc.PLUS
  //   returns 1: '+'

Closing as resolved in the meantime