Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exm

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exm - npm Package Compare versions

Comparing version 0.0.1 to 0.2.1

.eslintrc.js

65

package.json
{
"name": "exm",
"version": "0.0.1",
"author": "Roarke Lynch <roarkely@gmail.com>",
"description": "A (hobby) library to support the encoding of Javascript object inheritance in JSON.",
"main": "./lib/exm.js",
"repository": {
"type": "git",
"url": "https://github.com/roarkely/exm.git"
"version": "0.2.1",
"description": "EXtension Manager.",
"main": "lib/Exm.js",
"engines": {
"node": ">=12.13.0"
},
"scripts": {
"test": "mocha ./tests"
"directories": {
"test": "test"
},
"bin": {
"exm": "./bin/exm"
},
"dependencies": {
"underscore": "1.6.x"
"exec-kit": "^0.1.0",
"fs-kit": "^0.5.0",
"lazyness": "^1.2.0",
"semver": "^7.1.1",
"seventh": "^0.7.30",
"terminal-kit": "^1.32.3",
"utterminal": "^0.5.42"
},
"devDependencies": {
"mocha": "1.18.x"
"devDependencies": {},
"scripts": {
"test": "tea-time -R dot"
},
"repository": {
"type": "git",
"url": "https://github.com/cronvel/exm.git"
},
"keywords": [
"extension",
"manager"
],
"author": "Cédric Ronvel",
"license": "MIT",
"engines": {
"node": ">=0.10.22"
"bugs": {
"url": "https://github.com/cronvel/exm/issues"
},
"directories": {
"test": "tests"
"config": {
"tea-time": {
"coverDir": [
"lib"
]
}
},
"keywords": [
"javascript",
"JSON",
"inheritance"
]
"copyright": {
"title": "EXM",
"years": [
2020
],
"owner": "Cédric Ronvel"
}
}

@@ -1,89 +0,6 @@

exm
===
A (hobby) library to support the encoding of Javascript object inheritance in JSON. This library is not yet available via NPM, and is under active pre-release development.
## Inserting external values
You can insert external values into object fields if the value for any key starts with the dot-space `'. <url>'` notation.
# EXM: EXtension Manager
/** example.js */
var exm = require('exm');
var blueprint = {
"hello" : ". http://example.com/hello"
};
exm(blueprint, function(err, result) {
console.log( JSON.stringify(result) );
});
/** http://example.com/hello */
{
"name": "Gulliver",
"title": "Mr.",
"aliases", [ "Manfred", "Allen", "Bob" ]
}
/** result */
{
"hello" : {
"name": "Gulliver",
"title": "Mr.",
"aliases", [ "Manfred", "Allen", "Bob" ]
}
}
An extension/plugin manager for node.js.
## Insert in place
Using a variation on the dot-space notion, you can use _exm_ to inherit from external objects. When an object key is `"."`, the value is used as the external URL.
/** blueprint */
{
"." : "http://example.com/hello"
"title" : "Sgt.",
"phone" : "301-555-1234"
}
/** result */
{
"name": "Gulliver",
"title" : "Sgt.",
"phone" : "301-555-1234",
"aliases", [ "Manfred", "Allen", "Bob" ]
}
Notice that the value for inhertited field `title` was overridden, and the new field `phone` was added.
Inserting in place can be used anywhere in the blueprint object.
/** blueprint */
{
"foo" : "bar",
"hello" : {
"." : "http://example.com/hello"
}
}
/** result */
{
"foo" : "bar",
"hello" : {
"name": "Gulliver",
"title": "Mr."
},
"aliases", [ "Manfred", "Allen", "Bob" ]
}
## Arrays
**UNDER DEVELOPMENT**
Because order in array values is important, there are additional notions that allow you to control what
{
"hello" : [
"..",
"0..n",
"0..2",
". http://foobar"
]
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc