Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should accept valid strings', () => {
stringifyObject(obj, {}, ' ');
});
function get(key) {
if (api.config[key]) {
console.log(
stringifyObject(api.config[key], {
indent: ' ',
}),
);
}
}
function renderObjectProp(prop) {
const [ key, value ] = prop;
if (value === true) {
return key;
}
console.log(value);
const valueStr = improveCurly(sobj(value, { indent: ' ', inlineCharacterLimit: 50 }));
return `${key}={${valueStr}}`;
}
getTransformedValue = newValue => {
const value = JSON.parse(newValue);
return stringify(mongoose(value));
};
registerTask(taskName) {
this.debug(`Registering task: ${Util.colors.green(taskName)} for ${stringify(this.toTaskNames(this.recipes))}`)
this.gulp.task(taskName, this.createHelpText(), () => {
return this.run(this.recipes)
})
}
parseInput = input => {
const isInputJSON = this.isJSON(input);
const tabSize = new Array(MIRROR_OPTIONS.tabSize + 1).join(" ");
return isInputJSON
? prettify.json(JSON.stringify(JSON.parse(input)), tabSize, true)
: stringify(convertToObject(input), { singleQuotes: false });
};
const parseInput = input => {
const text = input.join();
const isInputJSON = isJSON(text);
return isInputJSON
? JSON.stringify(JSON.parse(text), null, 2)
: stringify(convertToObject(text), { singleQuotes: false });
};
function renderObjectProp(prop) {
var _prop2 = _slicedToArray(prop, 2),
key = _prop2[0],
value = _prop2[1];
if (value === true) {
return key;
}
var valueStr = improveCurly(sobj(value, {
indent: ' ',
inlineCharacterLimit: 50
}));
return "".concat(key, "={").concat(valueStr, "}");
}
let getSnippet = snippet => {
switch (atom.config.get('css-in-js.cssInJsOptions.snippet')) {
case 'glamorous':
return `const ${toUpperCamel(
snippet.key
)} = glamorous.div(${stringifyObject(snippet.style, {
indent: ' ',
singleQuotes: true,
})})`
case 'glamor':
return `const ${toCamel(
snippet.key
)} = css(${stringifyObject(snippet.style, {
indent: ' ',
singleQuotes: true,
})})`
}
}
let toJS = (rules, options) => {
dump(obj) {
return stringify(obj)
}