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

model-attributes

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

model-attributes - npm Package Compare versions

Comparing version 3.0.9 to 3.0.10

14

dist/attributes.js

@@ -9,3 +9,3 @@ 'use strict';

function DeclareType(name, options) {
const parent = types[options.parent] || types.base;
//const parent = types[options.parent] || types.base;

@@ -21,7 +21,7 @@ types[name] = Object.assign(options, options.parent);

parse(string, offset) {
return [undefined, offset];
},
toString(value) {
return value;
}
return [undefined, offset];
},
toString(value) {
return value;
}
});

@@ -95,3 +95,3 @@

function _setAttributes(object, dest, atts, src = {}, cb = (ca, path, value) => {}, prefix = '') {
function _setAttributes(object, dest, atts, src = {}, cb = (ca, path, value) => { }, prefix = '') {
Object.keys(atts).forEach(name => {

@@ -98,0 +98,0 @@ const ca = atts[name];

{
"name": "model-attributes",
"version": "3.0.9",
"version": "3.0.10",
"description": "attribute meta description",

@@ -13,10 +13,10 @@ "keywords": [

"scripts": {
"cover": "nyc npm test",
"test": "mocha tests/*_test.js",
"docs": "jsdoc2md -l off -t doc/README.hbs -f src/*.js >README.md",
"cover": "nyc ava",
"test": "ava",
"docs": "jsdoc2md --configure doc/jsdoc.json -l off -t doc/README.hbs -f src/*.js >README.md",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"prepublish": "rollup --output=dist/attributes.js -c -- src/attributes.js",
"pretest": "npm run prepublish",
"posttest": "markdown-doctest",
"precover": "npm run prepublish"
"pretest": "rollup -c rollup.config.test.js",
"posttest": "npm run prepublish && markdown-doctest",
"precover": "rollup -c rollup.config.test.js"
},

@@ -33,3 +33,2 @@ "repository": {

"devDependencies": {
"chai": "^3.5.0",
"cracks": "3.1.2",

@@ -39,6 +38,12 @@ "cz-conventional-changelog": "^2.0.0",

"markdown-doctest": "^0.9.1",
"mocha": "^3.2.0",
"nyc": "^10.2.0",
"nyc": "^10.3.2",
"rollup": "^0.41.6",
"semantic-release": "^6.3.6"
"semantic-release": "^6.3.6",
"jsdoc-babel": "^0.3.0",
"ava": "^0.19.1",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-multi-entry": "^2.0.1",
"babel-preset-es2015-rollup": "^3.0.0",
"babel-plugin-transform-async-generator-functions": "^6.24.1",
"xo": "^0.19.0"
},

@@ -60,3 +65,3 @@ "release": {

"engines": {
"node": ">=7.9.0"
"node": ">=7.10.0"
},

@@ -79,5 +84,16 @@ "config": {

"repository": {
"url": "https://github.com/Kronos-Tools/npm-package-template.git"
"url": "https://github.com/arlac77/npm-package-template.git"
}
},
"xo": {
"space": true
},
"ava": {
"files": [
"tests/build/bundle.js"
],
"require": [
"babel-register"
]
}
}
[![npm](https://img.shields.io/npm/v/model-attributes.svg)](https://www.npmjs.com/package/model-attributes)
[![Greenkeeper](https://badges.greenkeeper.io/arlac77/model-attributes)](https://greenkeeper.io/)
[![Greenkeeper](https://badges.greenkeeper.io/arlac77/model-attributes.svg)](https://greenkeeper.io/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/arlac77/model-attributes)

@@ -43,8 +43,8 @@ [![Build Status](https://secure.travis-ci.org/arlac77/model-attributes.png)](http://travis-ci.org/arlac77/model-attributes)

* <a name="module_model-attributes.setAttributes"></a>
* <a name="module_model-attributes..setAttributes"></a>
## model-attributes.setAttributes(dest, atts, src, cb, prefix) ⇒ <code>undefined</code>
## model-attributes~setAttributes(dest, atts, src, cb, prefix) ⇒ <code>undefined</code>
Copies attribute values from a source object into a destination object.
**Kind**: static method of <code>[model-attributes](#module_model-attributes)</code>
**Kind**: inner method of <code>[model-attributes](#module_model-attributes)</code>

@@ -60,8 +60,8 @@ | Param | Type | Description |

* <a name="module_model-attributes.getAttribute"></a>
* <a name="module_model-attributes..getAttribute"></a>
## model-attributes.getAttribute(object, atts, path) ⇒ <code>Any</code>
## model-attributes~getAttribute(object, atts, path) ⇒ <code>Any</code>
Delivers a attribute value for a given attribute name
**Kind**: static method of <code>[model-attributes](#module_model-attributes)</code>
**Kind**: inner method of <code>[model-attributes](#module_model-attributes)</code>
**Returns**: <code>Any</code> - attribute value

@@ -76,8 +76,8 @@

* <a name="module_model-attributes.getAttributes"></a>
* <a name="module_model-attributes..getAttributes"></a>
## model-attributes.getAttributes(object, attributes, options) ⇒ <code>object</code>
## model-attributes~getAttributes(object, attributes, options) ⇒ <code>object</code>
Retrive attribute values from an object
**Kind**: static method of <code>[model-attributes](#module_model-attributes)</code>
**Kind**: inner method of <code>[model-attributes](#module_model-attributes)</code>
**Returns**: <code>object</code> - values

@@ -92,8 +92,8 @@

* <a name="module_model-attributes.createAttributes"></a>
* <a name="module_model-attributes..createAttributes"></a>
## model-attributes.createAttributes(definitions) ⇒ <code>object</code>
## model-attributes~createAttributes(definitions) ⇒ <code>object</code>
Create attributes from its definition
**Kind**: static method of <code>[model-attributes](#module_model-attributes)</code>
**Kind**: inner method of <code>[model-attributes](#module_model-attributes)</code>
**Returns**: <code>object</code> - attributes

@@ -106,8 +106,8 @@

* <a name="module_model-attributes.mergeAttributes"></a>
* <a name="module_model-attributes..mergeAttributes"></a>
## model-attributes.mergeAttributes(dest, atts) ⇒ <code>object</code>
## model-attributes~mergeAttributes(dest, atts) ⇒ <code>object</code>
Merge attribute definitions
**Kind**: static method of <code>[model-attributes](#module_model-attributes)</code>
**Kind**: inner method of <code>[model-attributes](#module_model-attributes)</code>
**Returns**: <code>object</code> - merged definitions (dest)

@@ -114,0 +114,0 @@

@@ -8,8 +8,5 @@ /* jslint node: true, esnext: true */

import {
getType
}
from './types';
import { getType } from './types';
function _setAttributes(object, dest, atts, src = {}, cb = (ca, path, value) => {}, prefix = '') {
function _setAttributes(object, dest, atts, src = {}, cb = (ca, path, value) => { }, prefix = '') {
Object.keys(atts).forEach(name => {

@@ -16,0 +13,0 @@ const ca = atts[name];

@@ -7,3 +7,3 @@ /* jslint node: true, esnext: true */

export function DeclareType(name, options) {
const parent = types[options.parent] || types.base;
//const parent = types[options.parent] || types.base;

@@ -19,7 +19,7 @@ types[name] = Object.assign(options, options.parent);

parse(string, offset) {
return [undefined, offset];
},
toString(value) {
return value;
}
return [undefined, offset];
},
toString(value) {
return value;
}
});

@@ -26,0 +26,0 @@

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