
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@youngbeen/dasmet
Advanced tools
[TOC]
Dasmet is a light weight data management(e.g. store, dict) util library
if you hate ugly API usage for plain data store management, you may try dasmet
| vuex or other state management system | data model | dasmet | |
|---|---|---|---|
| data init | ☹️ Complicated | 🙂 Simple | 🙂 Simple |
| accessing data | 😐 A little complicated | 🙂 Simple | 🙂 Simple |
| setting by k-v | Must via commit(maybe complicated) | 🙂 Simple | 🙂 Simple |
| setting by object merging | Must via commit(maybe complicated) | ❌ No | ✅ Yes yet simple |
| data snapshot | ✅ Yes | ❌ No | ❌ No |
| weight | ☹️ Heavy | 🙂 Light | 🙂 Light |
| native Array bonus util support | ❌ No | ❌ No | ✅ Yes |
Tip: Please note that if you need data snapshot, a state management system is still better solution. But if you are aware of that #YouMayNotNeedStateManagement#, you should avoid using state management system in you project from now.
Array.get() like mapInstall it via npm
npm i -S @youngbeen/dasmet
import { newStore } from '@youngbeen/dasmet'
// generating data store instance
let userStore = newStore({
userName: '',
userId: ''
})
// setting value by k-v
userStore.set('userName', 'you')
userStore.set('newKey', 1)
/* -> {
userName: 'you',
userId: '',
newKey: 1
}
*/
// setting value by object merging (merge value)
userStore.set({
userName: 'youngbeen',
userId: '21'
})
/* -> {
userName: 'youngbeen',
userId: '21',
newKey: 1
}
*/
// accessing value
userStore.get('userName') // -> 'youngbeen'
// or
userStore.value.userId // -> '21'
New ES6+ Array has many amazing features like filter, map etc. In a dict model we ofter want to get an item directly, however it is not convenient using dict.someDictTypes.find(item => item.key === targetKey)
Dasmet brings a native support(via Array.prototype) of Array.get method
Array.get(value, [keyName])
e.g.
// finding item by specific value
dict.someDictTypes.get(targetKey)
Meanwhile, you can choose which key to get
dict.someDictTypes.get(targetKey, myKeyName)
Tip: if
keyNamenot set, default get priority isid > key > value
FAQs
`Dasmet` is a light weight data management(e.g. store, dict) util library
The npm package @youngbeen/dasmet receives a total of 8 weekly downloads. As such, @youngbeen/dasmet popularity was classified as not popular.
We found that @youngbeen/dasmet 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
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.