bump: version 4.0.5-indev
This commit is contained in:
parent
ab83b33725
commit
1d00af88c0
2 changed files with 30 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "asajs",
|
"name": "asajs",
|
||||||
"version": "4.0.4-preview",
|
"version": "4.0.5-indev",
|
||||||
"description": "Create your Minecraft JSON-UI resource packs using JavaScript",
|
"description": "Create your Minecraft JSON-UI resource packs using JavaScript",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Minecraft",
|
"Minecraft",
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,10 @@ export const defaultFunctions = {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
genBindings: [
|
genBindings: [
|
||||||
|
{
|
||||||
|
source: `(${input} < 0)`,
|
||||||
|
target: isNegative,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
source: `(${input} < 2)`,
|
source: `(${input} < 2)`,
|
||||||
target: isLowerThanTwo,
|
target: isLowerThanTwo,
|
||||||
|
|
@ -109,9 +113,30 @@ export const defaultFunctions = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// str_length: str => {
|
strlen: str => {
|
||||||
// if (!/\#\w+/.test(str)) throw new Error("Invalid string")
|
if (!/\#\w+/.test(str)) throw new Error("Invalid string")
|
||||||
// }
|
|
||||||
|
const count = RandomBindingString()
|
||||||
|
const inputStr = RandomBindingString()
|
||||||
|
|
||||||
|
return {
|
||||||
|
genBindings: [
|
||||||
|
{
|
||||||
|
source: `0 * (${str} = 'a')`,
|
||||||
|
target: count,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `'a' + ${str}`,
|
||||||
|
target: inputStr,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${count} + (not ((('%.' + (${count} + 1) + 's') * ${inputStr}) = ${inputStr}))`,
|
||||||
|
target: count,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
value: count,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a translatable string
|
* Return a translatable string
|
||||||
|
|
@ -120,6 +145,7 @@ export const defaultFunctions = {
|
||||||
*/
|
*/
|
||||||
translatable: key => {
|
translatable: key => {
|
||||||
return {
|
return {
|
||||||
|
genBindings: [],
|
||||||
value: `'%' + ${key}`,
|
value: `'%' + ${key}`,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Reference in a new issue