![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@jsonlang/array
Advanced tools
It is JsonLang Plugin/Extension for Array/Collection operations.
npm install @jsonlang/core @jsonlang/array
import { JsonLang } from '@jsonlang/core';
import { ArrayRules } from '@jsonlang/array';
const jsonLang = new JsonLang();
jsonLang.import(ArrayRules);
All
nested Rules
.Filter
Internal
, to access it by the inner rules, you will need to use Data Rule with scope local, check this example.Map
Internal
, to access it by the inner rules, you will need to use Data Rule with scope local.Foreach
Internal
, to access it by the inner rules, you will need to use Data Rule with scope local.Flatten
import { JsonLang } from '@jsonlang/core';
import { LogicRules } from '@jsonlang/logic';
import { ArrayRules } from '@jsonlang/array';
import { ObjectRules } from '@jsonlang/object';
const jsonLang = new JsonLang();
jsonLang.import(LogicRules, ArrayRules, ObjectRules);
const result = jsonLang.execute({ $R: 'All', $I: [
{
$R: 'Filter',
$I: [[1, 3, 5], { $R: '>', $I: [{ $R: 'Data', $I: ['Internal'] }, 2] }]
},
{
$R: 'Filter',
$I: [
{ $R: 'Get', $I: ['data.test', null, { $R: 'Data', $I: ['External'] }] },
{ $R: '<', $I: [{ $R: 'Data', $I: ['Internal'] }, 500] }
]
}
] }, { data: { id: 'test', test: [100, 300, 700] } }, { sync: true });
console.log(result);
// [ [ 3, 5 ], [ 100, 300 ] ]
This library uses Array.map
and Array.reduce
, so it's not exactly Internet Explorer 8 friendly.
JsonLang/Array is MIT licensed
FAQs
JsonLang Extension for Array/Collection Operations
The npm package @jsonlang/array receives a total of 2,623 weekly downloads. As such, @jsonlang/array popularity was classified as popular.
We found that @jsonlang/array demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.