NoobScript 1.1.0
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package NoobScript --version 1.1.0
NuGet\Install-Package NoobScript -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NoobScript" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NoobScript" Version="1.1.0" />
<PackageReference Include="NoobScript" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NoobScript --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NoobScript, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NoobScript@1.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NoobScript&version=1.1.0
#tool nuget:?package=NoobScript&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
string source = @"
<?
class base {
public function __construct() {
/*
init database or other global functions
*/
$object->deep_copy = function($input) {
return $object->fromJSON($object->toJSON($input));
};
$object->index_of = function($input, $search_value) {
foreach($input as $indexofkey => $value) {
if($search_value == $value) {
return $indexofkey;
}
}
return -1;
};
$object->union = function($a, $b, $comparator) {
foreach($b as $b_value) {
$exists = false;
foreach($a as $a_value) {
$comparator_result = $comparator($a_value, $b_value);
if($comparator_result) {
$exists = true;
}
}
if(!$exists) {
$a[] = $b_value;
}
}
return NULL;
};
$object->map = function($arr, $func) {
$result = [];
foreach($arr as $row) {
$result[] = $func($row);
}
return $result;
};
}
}
$base_instance = new base();
?>
";
JSParse jsparse = new JSParse();
jsparse.start(source);
PHPInterpretation interpret = new PHPInterpretation();
PHPScriptFunction globalContext = interpret.initGlobalContext(null);
jsparse.run(interpret);
Example of defining included objects:
class PHPData : PHPScriptObject
{
public local_data local_instance;
public void init(PHPScriptFunction context, string basePath)
{
this.initArrays();
this.globalObject = true;
this.local_instance = new local_data();
this.local_instance.init(basePath);
PHPScriptFunction execute = new PHPScriptFunction();
execute.initArrays();
this.setDictionaryValue("execute", execute);
execute.prototype = this;
execute.setClosure((values, self_instance) => {
//System.Diagnostics.Debug.WriteLine("query : ", values);
object input = ((List<object>)values[0])[0];
input = self_instance.parseInputVariable(input);
string inputString = input.ToString();
....
}, "main");
.... then you can use the set variablefunction on the global context to make the object available within the noobscript context.
https://github.com/noobsoftware/NoobScript-csharp
Objective-C version https://github.com/noobsoftware/NoobScript-GNUStep
code examples https://github.com/noobsoftware/NumEval-noobscript
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Newtonsoft.Json (>= 13.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|