Sha256: 7765fe822c639416236261b73cdca230a7f031b47bf6a17cfb89fd576314aaeb

Contents?: true

Size: 287 Bytes

Versions: 87

Compression:

Stored size: 287 Bytes

Contents

var isProperty = require('is-property')

var gen = function(obj, prop) {
  return isProperty(prop) ? obj+'.'+prop : obj+'['+JSON.stringify(prop)+']'
}

gen.valid = isProperty
gen.property = function (prop) {
 return isProperty(prop) ? prop : JSON.stringify(prop)
}

module.exports = gen

Version data entries

87 entries across 82 versions & 13 rubygems

Version Path
govuk_publishing_components-18.0.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.21.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.20.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.19.1 node_modules/generate-object-property/index.js
govuk_publishing_components-17.19.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.18.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.17.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.16.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.15.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.14.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.13.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.12.2 node_modules/generate-object-property/index.js
govuk_publishing_components-17.12.1 node_modules/generate-object-property/index.js
govuk_publishing_components-17.12.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.11.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.10.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.9.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.8.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.7.0 node_modules/generate-object-property/index.js
govuk_publishing_components-17.6.1 node_modules/generate-object-property/index.js