noop-enterprise 1.0.0 → 2.0.0
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.
- package/README.md +6 -1
- package/index.js +3 -3
- package/lib/core/generateNoop.js +57 -0
- package/lib/do_not_use_or_be_fired/self_destructor.js +6 -2
- package/lib/emoticon-support/support-money.js +1 -0
- package/lib/emoticon-support/support-o_o.js +1 -0
- package/lib/libraries/libraries.js +39 -0
- package/lib/utils/registerArgument.js +6 -4
- package/package.json +26 -5
- package/lib/logs/registered_arguments.log.txt +0 -1
- package/t.js +0 -3
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Noopxrtxthtkvjhvtyvghggfgfhgfhfghfhgfhgfgfujuftj
|
|
2
2
|
Enterprise-grade serious noop function.
|
|
3
3
|
|
|
4
|
+
**EXTREMELY IMPORTANT NOTICE: READ THE ENTRE INDEX.JS FILE, THE ENTIRE README (ESPECIALLY THE SECTION ENTITLED "READ ME!!! READ ME!!!"), AND THE ENTIRE LICENCE BEFORE USING THE SOFTWARE. OR DON'T, BUT COMPLETELY AT YOUR OWN RISK**
|
|
5
|
+
|
|
6
|
+
**ALSO READ EVERYTHING BELOW:**
|
|
7
|
+
|
|
4
8
|
Requiring Noopxrtxthtkvjhvtyvghggfgfhgfhfghfhgfhgfgfujuftj's enterprise noop function may leak disk space. However, the noop function itself does nothing. That's our 100% guarantee. Other noop modules don't have 100% guarantees, so this one is the best. However, before reading anything else, read the section below:
|
|
5
9
|
|
|
6
10
|
## READ ME!!! READ ME!!!
|
|
@@ -126,6 +130,7 @@ Sometimes you need to ensure a function exists even if it doesn't do anything, t
|
|
|
126
130
|
const not = require("lolite.not")
|
|
127
131
|
const isFunction = require("lolite.isfunction")
|
|
128
132
|
const noop = require("noop-enterprise")
|
|
133
|
+
const _console = require("@10xly/global/console")
|
|
129
134
|
|
|
130
135
|
function callWithStringEnterprise(func) {
|
|
131
136
|
// This is a function to call the given function with the string "enterprise" as an argument.
|
|
@@ -136,7 +141,7 @@ function callWithStringEnterprise(func) {
|
|
|
136
141
|
return func("enterprise") // safe!
|
|
137
142
|
}
|
|
138
143
|
|
|
139
|
-
callWithStringEnterprise(
|
|
144
|
+
callWithStringEnterprise(_console.log) // outputs "enterprise"
|
|
140
145
|
callWithStringEnterprise("not a function") // normally would error, but now just does nothing
|
|
141
146
|
```
|
|
142
147
|
|
package/index.js
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
// Code begins.
|
|
15
15
|
|
|
16
|
-
// line
|
|
16
|
+
// line belo: import positive value
|
|
17
17
|
const POSITIVE_VALUE = require("./lib/constants/POSITIVE_VALUE")
|
|
18
|
-
// line
|
|
18
|
+
// line belo: NORMALLY USE OF THIS WOULD FIRE USER OF THE SAID MODULE, BUT AS THE DEVELOPER OF THIS MODULE, I CAN USE THIS. CONTRIBUTORS CAN'T. IF THE FUNCTIONALITY THEY WANT IS ONLY IN THE SPECIFIC MODULE, THEN THEY MUST WRITE THEIR OWN MODULE. NO BUTS. NO IFS. NO ANDS. NO ORS. NO BEFORE. NO AFTER. NO INBETWEEN.
|
|
19
19
|
const __DO_NOT_USE_OR_BE_FIRED_EXPERIMENTAL_SELF_DESTRUCT_CLASS_RETURNER__ = require("./lib/do_not_use_or_be_fired/self_destructor")
|
|
20
|
-
// line
|
|
20
|
+
// line belo: import construct-new-second
|
|
21
21
|
const construct = require("./lib/libraries/libraries").classUtilities
|
|
22
22
|
.constructNewSecond
|
|
23
23
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// PLEASE NO FORMAT THIS FIEL
|
|
2
|
+
// IT MIGHT BRAKE
|
|
3
|
+
// I THINK
|
|
4
|
+
|
|
5
|
+
require("../emoticon-support/support-money")
|
|
6
|
+
require("../emoticon-support/support-o_o")
|
|
7
|
+
|
|
8
|
+
const toString$$$ /* add $$$ so we don't override global toString */ = require("../libraries/libraries").stringUtils.toString
|
|
9
|
+
o_O
|
|
10
|
+
|
|
11
|
+
const replaceAllOf = require("../libraries/libraries").stringUtils.replaceAllOf
|
|
12
|
+
const length = require("../libraries/libraries").stringUtils.stringLength
|
|
13
|
+
const subtract = require("../libraries/libraries").math.subtract
|
|
14
|
+
const concat = require("../libraries/libraries").stringUtils.concat
|
|
15
|
+
|
|
16
|
+
const leftParenthesis = require("../libraries/libraries").strings.leftParenthesis
|
|
17
|
+
const rightParenthesis = require("../libraries/libraries").strings.rightParenthesis
|
|
18
|
+
|
|
19
|
+
const numbers = require("../libraries/libraries").numbers
|
|
20
|
+
|
|
21
|
+
const setFunctionName = require("../libraries/libraries").functions.setFunctionName
|
|
22
|
+
|
|
23
|
+
function stubNoop() {
|
|
24
|
+
function noop() {}
|
|
25
|
+
noop
|
|
26
|
+
$$$
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function generateNoopString() {
|
|
30
|
+
const noopFunctionBody = require("../libraries/libraries").strings.emptyString
|
|
31
|
+
let str = toString$$$(stubNoop)
|
|
32
|
+
str = replaceAllOf(str, "\r", noopFunctionBody) // stupid windows with its crlf
|
|
33
|
+
str = str.substr(numbers.twentyOne)
|
|
34
|
+
str = str.substr(numbers.one)
|
|
35
|
+
str = str.substr(numbers.one)
|
|
36
|
+
str = str.substr(numbers.one)
|
|
37
|
+
str = str.substr(numbers.zero, subtract(length(str), numbers.fifteen))
|
|
38
|
+
let beforeBody = str.split(noopFunctionBody)
|
|
39
|
+
const afterBody = beforeBody.pop()
|
|
40
|
+
beforeBody = beforeBody.join(noopFunctionBody)
|
|
41
|
+
return concat(leftParenthesis, beforeBody, noopFunctionBody, afterBody, rightParenthesis)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function generateNoop() {
|
|
45
|
+
eval(require("javascript-interpreter"))
|
|
46
|
+
const interpret = require("javascript-interpreter/interpret")
|
|
47
|
+
const string = generateNoopString()
|
|
48
|
+
|
|
49
|
+
const myNoop = interpret(string)
|
|
50
|
+
o_O
|
|
51
|
+
|
|
52
|
+
setFunctionName(myNoop, "fn")
|
|
53
|
+
|
|
54
|
+
return myNoop
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
module.exports = generateNoop
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
const isEqPositiveValue = require("../utils/isEqPositiveValue")
|
|
2
|
+
const not = require("../libraries/libraries").negation.not
|
|
3
|
+
const throwErrorWithMessage = require("../libraries/libraries").errors.throwErrorWithMessage
|
|
4
|
+
const generateNoop = require("../core/generateNoop")
|
|
2
5
|
|
|
3
6
|
function __DO_NOT_USE_OR_BE_FIRED_EXPERIMENTAL_SELF_DESTRUCT_CLASS_RETURNER__() {
|
|
4
7
|
return __DO_NOT_USE_OR_BE_FIRED_EXPERIMENTAL_SELF_DESTRUCT_CLASS__
|
|
5
8
|
}
|
|
6
9
|
|
|
10
|
+
// DO NOT USE OR BE FIRED UNLESS YOUR TJ-COMMITS
|
|
7
11
|
class __DO_NOT_USE_OR_BE_FIRED_EXPERIMENTAL_SELF_DESTRUCT_CLASS__ {
|
|
8
12
|
constructor(__DO_NOT_SET_TO_A_POSITIVE_VALUE_OR_BE_FIRED__, suppress) {
|
|
9
13
|
// if suppress is passed you can use this, but only if you're tj-commits
|
|
@@ -15,9 +19,9 @@ class __DO_NOT_USE_OR_BE_FIRED_EXPERIMENTAL_SELF_DESTRUCT_CLASS__ {
|
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
selfDestruct(suppress) {
|
|
18
|
-
if (
|
|
22
|
+
if (not(suppress)) throwErrorWithMessage("WARNING: YOU'RE GETTING FIRED!!!!!!!!!!!")
|
|
19
23
|
return {
|
|
20
|
-
fn()
|
|
24
|
+
fn: generateNoop(),
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("../libraries/libraries").global.globalObject.$$$ = "some defined thing"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("no_op")
|
|
@@ -5,6 +5,9 @@ module.exports = {
|
|
|
5
5
|
comparisonFunctions: {
|
|
6
6
|
isEqual: require("is-equal"),
|
|
7
7
|
},
|
|
8
|
+
math: {
|
|
9
|
+
subtract: require("subtract"),
|
|
10
|
+
},
|
|
8
11
|
nodeLibraries: {
|
|
9
12
|
fs: require("node:fs"),
|
|
10
13
|
path: require("node:path"),
|
|
@@ -12,4 +15,40 @@ module.exports = {
|
|
|
12
15
|
cachedIntrinsics: {
|
|
13
16
|
Date: require("lolite.__private.date"),
|
|
14
17
|
},
|
|
18
|
+
strings: {
|
|
19
|
+
newlineCharacter: require("fizzbuzz-enterprise/source/main/constants/strings/delimiters/Newline"),
|
|
20
|
+
emptyString: require("empty-string"),
|
|
21
|
+
leftParenthesis: require("@characters/left-parenthesis").default,
|
|
22
|
+
rightParenthesis: require("@characters/right-parenthesis").default,
|
|
23
|
+
},
|
|
24
|
+
objectUtilities: {
|
|
25
|
+
stringify: require("json-stringify-safe"),
|
|
26
|
+
},
|
|
27
|
+
negation: {
|
|
28
|
+
not: require("es-logical-not-operator"),
|
|
29
|
+
},
|
|
30
|
+
errors: {
|
|
31
|
+
throwErrorWithMessage: require("immediate-error"),
|
|
32
|
+
},
|
|
33
|
+
pathUtils: {
|
|
34
|
+
getDirname: require("path-__dirname"),
|
|
35
|
+
},
|
|
36
|
+
stringUtils: {
|
|
37
|
+
toString: require("@rightpad/convert2string"),
|
|
38
|
+
replaceAllOf: require("str-replaceallof-es"),
|
|
39
|
+
stringLength: require("utf8-byte-length"),
|
|
40
|
+
concat: require("@rightpad/concat"),
|
|
41
|
+
},
|
|
42
|
+
global: {
|
|
43
|
+
globalObject: require("@10xly/global"),
|
|
44
|
+
},
|
|
45
|
+
numbers: {
|
|
46
|
+
zero: require("integer-value-positive-zero")(),
|
|
47
|
+
one: require("@positive-numbers/one"),
|
|
48
|
+
fifteen: require("@positive-numbers/fifteen"),
|
|
49
|
+
twentyOne: require("@positive-numbers/twenty-one"),
|
|
50
|
+
},
|
|
51
|
+
functions: {
|
|
52
|
+
setFunctionName: require("set-function-name"),
|
|
53
|
+
},
|
|
15
54
|
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
const fs = require("../../lib/libraries/libraries").nodeLibraries.fs
|
|
2
2
|
const path = require("../../lib/libraries/libraries").nodeLibraries.path
|
|
3
|
+
const NEWLINE = require("../../lib/libraries/libraries").strings.newlineCharacter
|
|
3
4
|
const construct = require("../../lib/libraries/libraries").classUtilities.constructNewSecond
|
|
5
|
+
const stringify = require("../../lib/libraries/libraries").objectUtilities.stringify
|
|
4
6
|
const REGISTERED_ARGUMENTS_LOG_FILE_PATH = require("../constants/REGISTERED_ARGUMENTS_LOG_FILE_PATH")
|
|
5
7
|
const POSITIVE_VALUE = require("../constants/POSITIVE_VALUE")
|
|
6
|
-
|
|
8
|
+
const getDirname = require("../libraries/libraries").pathUtils.getDirname
|
|
7
9
|
const Date = require("../../lib/libraries/libraries").cachedIntrinsics.Date
|
|
8
10
|
|
|
9
11
|
module.exports = function registerArgument(function_argument_value01) {
|
|
10
12
|
// we cannot register the argument function_argument_value01 because this is the registerArgument function
|
|
11
13
|
fs.appendFileSync(
|
|
12
|
-
path.join(
|
|
13
|
-
`${construct(Date)} Registered argument: ${
|
|
14
|
+
path.join(getDirname(), REGISTERED_ARGUMENTS_LOG_FILE_PATH),
|
|
15
|
+
`${NEWLINE}${construct(Date)} Registered argument: ${stringify(
|
|
14
16
|
function_argument_value01
|
|
15
|
-
)}`
|
|
17
|
+
)}${NEWLINE}`
|
|
16
18
|
)
|
|
17
19
|
|
|
18
20
|
return POSITIVE_VALUE
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "noop-enterprise",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "noopxrtxthtkvjhvtyvghggfgfhgfhfghfhgfhgfgfujuftj",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"noop",
|
|
7
7
|
"enterprise"
|
|
8
8
|
],
|
|
9
|
-
"homepage": "https://github.com/
|
|
9
|
+
"homepage": "https://github.com/10xly/noop-enterprise#readme",
|
|
10
10
|
"bugs": {
|
|
11
|
-
"url": "https://github.com/
|
|
11
|
+
"url": "https://github.com/10xly/noop-enterprise/issues"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/
|
|
15
|
+
"url": "git+https://github.com/10xly/noop-enterprise.git"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"author": "me",
|
|
@@ -25,9 +25,30 @@
|
|
|
25
25
|
"test": "node --expose-gc tests/test"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
+
"@10xly/global": "^1.0.0",
|
|
29
|
+
"@characters/left-parenthesis": "^2.1.0",
|
|
30
|
+
"@characters/right-parenthesis": "^2.1.0",
|
|
31
|
+
"@positive-numbers/fifteen": "^3.0.0",
|
|
32
|
+
"@positive-numbers/one": "^3.0.0",
|
|
33
|
+
"@positive-numbers/twenty-one": "^3.0.0",
|
|
34
|
+
"@rightpad/concat": "^1.0.0",
|
|
35
|
+
"@rightpad/convert2string": "^1.0.0",
|
|
28
36
|
"construct-new-second": "^1.0.0",
|
|
37
|
+
"empty-string": "^1.1.1",
|
|
38
|
+
"es-logical-not-operator": "^1.0.0",
|
|
39
|
+
"fizzbuzz-enterprise": "^1.0.0",
|
|
40
|
+
"immediate-error": "^2.0.0",
|
|
41
|
+
"integer-value-positive-zero": "^1.0.2",
|
|
29
42
|
"is-equal": "^1.7.0",
|
|
30
|
-
"
|
|
43
|
+
"javascript-interpreter": "^1.0.0",
|
|
44
|
+
"json-stringify-safe": "^5.0.1",
|
|
45
|
+
"lolite.__private.date": "^1.1.15",
|
|
46
|
+
"no_op": "^1.0.0",
|
|
47
|
+
"path-__dirname": "^2.1.0",
|
|
48
|
+
"set-function-name": "^2.0.2",
|
|
49
|
+
"str-replaceallof-es": "^1.0.0",
|
|
50
|
+
"subtract": "^0.0.3",
|
|
51
|
+
"utf8-byte-length": "^1.0.5"
|
|
31
52
|
},
|
|
32
53
|
"devDependencies": {
|
|
33
54
|
"enterprise-10x-testing-framework-js": "^1.0.1"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Fri Jan 24 2025 14:45:23 GMT-0600 (Central Standard Time) Registered argument: {"a":1,"b":2}Fri Jan 24 2025 14:56:53 GMT-0600 (Central Standard Time) Registered argument: {"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Fri Jan 24 2025 14:57:21 GMT-0600 (Central Standard Time) Registered argument: {"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Fri Jan 24 2025 14:58:21 GMT-0600 (Central Standard Time) Registered argument: {"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Fri Jan 24 2025 14:58:27 GMT-0600 (Central Standard Time) Registered argument: {"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:04:15 GMT-0600 (Central Standard Time) Registered argument: {"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:07:30 GMT-0600 (Central Standard Time) Registered argument: {"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:08:41 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:12:02 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:54:04 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:54:15 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:55:02 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:55:53 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:56:15 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 16:56:46 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:03:11 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:28:04 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:28:33 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:29:27 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:30:14 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:30:58 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:31:24 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:32:18 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:33:46 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:34:20 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:34:37 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}Thu Jan 15 2026 17:41:11 GMT-0600 (Central Standard Time) Registered argument: {"argument":4294967295,"name":"function_argument_value01","fnName":"isEqToPositiveValue"}
|
package/t.js
DELETED