esoftplay 0.0.133-d → 0.0.133-e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/perf.js +2 -2
  2. package/package.json +1 -1
package/bin/perf.js CHANGED
@@ -11,9 +11,9 @@ if (param == 'clear') {
11
11
  let text = fs.readFileSync('./modules/' + module + '/' + task, { encoding: 'utf8' })
12
12
  const isHooks = (/\/\/\s{0,}withHooks/g).exec(text)
13
13
  const memoiz = (/\nexport default memo\(([a-zA-Z0-9]+)\)\;/g).exec(text)
14
+ text = text.replace("\nimport { memo } from 'react';", "")
14
15
  if (isHooks && memoiz && memoiz.length > 1) {
15
16
  const [exdefCurrent, currentNameFunction] = memoiz
16
- text = text.replace("\nimport {memo} from 'react';", "")
17
17
  text = text.replace(exdefCurrent, '')
18
18
  text = text.replace("function " + currentNameFunction + "(", "export default function " + currentNameFunction + "(")
19
19
  fs.writeFileSync('./modules/' + module + '/' + task, text, { encoding: 'utf8' })
@@ -32,7 +32,7 @@ if (param == 'clear') {
32
32
  const exdef = (/\nexport default function ([a-zA-Z0-9]+)\(/g).exec(text)
33
33
  if (exdef && exdef.length > 1) {
34
34
  const [exdefCurrent, currentNameFunction] = exdef
35
- text = text.replace('withHooks', "withHooks\nimport {memo} from 'react';")
35
+ text = text.replace('withHooks', "withHooks\nimport { memo } from 'react';")
36
36
  text = text.replace(exdefCurrent, "\nfunction " + currentNameFunction + '(')
37
37
  text = text + '\nexport default memo(' + currentNameFunction + ');'
38
38
  fs.writeFileSync('./modules/' + module + '/' + task, text, { encoding: 'utf8' })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.133-d",
3
+ "version": "0.0.133-e",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",