| const lang = require('../lang-mini'); | ||
| const {each, combos} = lang; | ||
| const util = require('util'); | ||
| const combo1 = () => { | ||
@@ -20,2 +20,50 @@ | ||
| const combo2 = () => { | ||
| const arr_five_most_frequent_hebrew_letters = ['י', 'ה', 'ו', 'ל', 'א']; | ||
| /* | ||
| const input1 = [ | ||
| ['י', 'ה', 'ו', 'ל', 'א'], | ||
| ['י', 'ה', 'ו', 'ל', 'א'], | ||
| ['י', 'ה', 'ו', 'ל', 'א'] | ||
| ] | ||
| */ | ||
| const input1 = [ | ||
| arr_five_most_frequent_hebrew_letters, | ||
| arr_five_most_frequent_hebrew_letters, | ||
| arr_five_most_frequent_hebrew_letters | ||
| ] | ||
| const res = combos(input1); | ||
| //console.log('combo2 res', res); | ||
| return res; | ||
| } | ||
| const combo3 = () => { | ||
| // https://www.omniglot.com/conscripts/sehefata.htm | ||
| const arr_five_geez_letters_equivalent_to_five_most_frequent_hebrew_letters = ['የ', 'ሀ', 'ወ', 'ለ', 'አ']; | ||
| const input1 = [ | ||
| arr_five_geez_letters_equivalent_to_five_most_frequent_hebrew_letters, | ||
| arr_five_geez_letters_equivalent_to_five_most_frequent_hebrew_letters, | ||
| arr_five_geez_letters_equivalent_to_five_most_frequent_hebrew_letters | ||
| ] | ||
| const res = combos(input1); | ||
| //console.log('combo2 res', res); | ||
| return res; | ||
| } | ||
| if (require.main === module) { | ||
@@ -26,2 +74,42 @@ const res1 = combo1(); | ||
| const res2 = combo2(); | ||
| //console.log('res2', res2); | ||
| console.log('res2', util.inspect(res2, { | ||
| maxArrayLength: 10000, // Set the max length option | ||
| //compact: true // Optional: Make the output more concise | ||
| })); | ||
| //console.log('res2', JSON.stringify(res2)); | ||
| console.log('res2.length', res2.length); | ||
| const r2_as_words = res2.map(x => x.reverse().join('')); | ||
| console.log('r2_as_words', util.inspect(r2_as_words, { | ||
| maxArrayLength: 10000, // Set the max length option | ||
| //compact: true // Optional: Make the output more concise | ||
| })); | ||
| const res3 = combo3(); | ||
| //console.log('res2', res2); | ||
| console.log('res3', util.inspect(res3, { | ||
| maxArrayLength: 10000, // Set the max length option | ||
| //compact: true // Optional: Make the output more concise | ||
| })); | ||
| //console.log('res2', JSON.stringify(res2)); | ||
| console.log('res3.length', res3.length); | ||
| const r3_as_words = res3.map(x => x.join('')); | ||
| console.log('r3_as_words', util.inspect(r3_as_words, { | ||
| maxArrayLength: 10000, // Set the max length option | ||
| //compact: true // Optional: Make the output more concise | ||
| })); | ||
| //console.log('r3_as_words', r3_as_words); | ||
| } | ||
@@ -28,0 +116,0 @@ |
+12
-2
@@ -10,2 +10,13 @@ /* | ||
| // Then it could work on training data for creation of functions from descriptions, either in English or JSON description. | ||
| // Late 2023 - May be worth extending to cover / handle data models. | ||
| // Integrating further withing Data_Object and Data_Value. | ||
| // lang-tools code and examples involving them would help, being able to have data types specified and (auto) validated. | ||
| // Including working with async/obs updates too. | ||
| */ | ||
@@ -312,3 +323,3 @@ | ||
| // Seems like grammar contexts will be useful for this. | ||
| // Be able to give grammar to a function? | ||
| // Be able to give grammar to a function? | ||
| // So that the params / io can be understood according to that grammar. | ||
@@ -335,3 +346,2 @@ | ||
| /* | ||
@@ -338,0 +348,0 @@ identify_obj_against_grammar_matches |
+14
-3
@@ -16,2 +16,8 @@ /* | ||
| // Possibility of using grammar with Data_Object and Data_Value. | ||
| // Though does look like it's worth approaching it from a point of simplicity and efficiency too. | ||
| // Efficiency is more important, simplicity can be in an easy and efficient high level API. | ||
| // And if it gets called with the wrong data types....? | ||
| const multiply_2_numbers = mfp({ | ||
@@ -306,2 +312,6 @@ // could name the params? | ||
| // Using grammar with mfp seems fairly useful / interesting. | ||
| // a kind of grammar specified functional programming system. | ||
| const check_credentials = mfp({ | ||
@@ -325,2 +335,3 @@ 'name': 'check_credentials', | ||
| const [username, password] = arr_credentials; | ||
| //console.log('[username, password]', [username, password]); | ||
| if (username === 'root') { | ||
@@ -342,3 +353,3 @@ if (password === 'ubuntu') { | ||
| let r1 = check_credentials('james', 'hello'); | ||
| let r1 = check_credentials(['james', 'hello']); | ||
| // seems to be working:) | ||
@@ -350,3 +361,3 @@ | ||
| let r2 = check_credentials('root', 'ubuntu'); | ||
| let r2 = check_credentials(['root', 'ubuntu']); | ||
| // seems to be working:) | ||
@@ -356,3 +367,3 @@ | ||
| //console.log('r2', r2); | ||
| //console.log('**** r2', r2); | ||
@@ -359,0 +370,0 @@ return [r1, r2]; |
+7
-0
@@ -26,2 +26,4 @@ const lang = require('./lang-mini'); | ||
| // oext seems to work with types though, or would benefit from types. | ||
| // No, oext does not have much for types, moving field and prop from oext here, need to get the data types working with Data_Object | ||
| // and Data_Value. | ||
@@ -32,2 +34,7 @@ | ||
| // Maybe move to lang-tools? | ||
| // fp() may benefit from integration with this. | ||
| // What the type represents. | ||
@@ -34,0 +41,0 @@ // What it signifies? |
+1
-1
@@ -24,3 +24,3 @@ { | ||
| }, | ||
| "version": "0.0.33" | ||
| "version": "0.0.34" | ||
| } |
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
301996
4.17%8035
4.35%18
50%