Sha256: 1275eb601d363ac069d1c8512babea0df53342398d00fc67c3fb6c562787fbcd

Contents?: true

Size: 1.04 KB

Versions: 161

Compression:

Stored size: 1.04 KB

Contents

{"version":3,"names":["_isType","require","_index","isImmutable","node","isType","type","isIdentifier","name"],"sources":["../../src/validators/isImmutable.ts"],"sourcesContent":["import isType from \"./isType.ts\";\nimport { isIdentifier } from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is definitely immutable.\n */\nexport default function isImmutable(node: t.Node): boolean {\n  if (isType(node.type, \"Immutable\")) return true;\n\n  if (isIdentifier(node)) {\n    if (node.name === \"undefined\") {\n      // immutable!\n      return true;\n    } else {\n      // no idea...\n      return false;\n    }\n  }\n\n  return false;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAMe,SAASE,WAAWA,CAACC,IAAY,EAAW;EACzD,IAAI,IAAAC,eAAM,EAACD,IAAI,CAACE,IAAI,EAAE,WAAW,CAAC,EAAE,OAAO,IAAI;EAE/C,IAAI,IAAAC,mBAAY,EAACH,IAAI,CAAC,EAAE;IACtB,IAAIA,IAAI,CAACI,IAAI,KAAK,WAAW,EAAE;MAE7B,OAAO,IAAI;IACb,CAAC,MAAM;MAEL,OAAO,KAAK;IACd;EACF;EAEA,OAAO,KAAK;AACd","ignoreList":[]}

Version data entries

161 entries across 15 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.49 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-annotate-as-pure/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/preset-modules/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-modules-systemjs/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-function-name/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/template/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-replace-supers/node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-async-generator-functions/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helpers/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-wrap-function/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@babel/types/lib/validators/isImmutable.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-simple-access/node_modules/@babel/types/lib/validators/isImmutable.js.map