![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.
dot-wild-tiny
Advanced tools
Use powerful dot notation (dot path + wildcard) to access properties of JSON
Use powerful dot notation (dot path + wildcard) to access properties of JSON.
If you need to do set or delete, use dot-wild which has all functions.
$ npm install dot-wild-tiny --save
# or
$ yarn add dot-wild-tiny
import * as dot from 'dot-wild-tiny';
/**
* Getter
*/
dot.get({ foo: { bar: 'baz' } }, 'foo.bar');
// => 'baz'
dot.get({ 'foo.bar': 'baz' }, 'foo\\.bar');
// => 'baz'
dot.get({ 'foo.bar': 'baz' }, 'notfound', 'default');
// => 'default'
const authorData = {
authors: [
{ username: 'tsuyoshiwada', profile: { age: 24 } },
{ username: 'sampleuser', profile: { age: 30 } },
{ username: 'foobarbaz', profile: { age: 33 } }
]
};
dot.get(authorData, 'authors.*.username');
// => ['tsuyoshiwada', 'sampleuser', 'foobarbaz']
dot.get(authorData, 'authors.*.profile.age');
// => [24, 30, 33]
/**
* Collection helpers (forEach, map)
*/
dot.forEach(postData, 'data.posts.*.id', (value, key, context, path, data) => {
// value => 1, 2
// key => 'id', 'id'
// context => { id: 1, title: 'post 1' }, { id: 2, title: 'post 2' }
// path => 'data.posts.0.id', 'data.posts.1.id'
// data => postData...
});
dot.map(postData, 'data.tags.*.name', (value, key, context, path, data) => {
return `${dot.get(data, path)} === ${value} (${key})`;
});
// => ['tag 1 === tag 1 (name)', 'tag 2 === tag 2 (name)']
Bugs, feature requests and comments are more than welcome in the issues.
v1.0.0
2017-12-17
get
, forEach
, map
methods.FAQs
Use powerful dot notation (dot path + wildcard) to access properties of JSON
The npm package dot-wild-tiny receives a total of 5 weekly downloads. As such, dot-wild-tiny popularity was classified as not popular.
We found that dot-wild-tiny 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.