Sha256: db3130a72fcce95552813ea751f7df23de5f431311c3643dcb7a6fa18f4b9eff

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 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"}

Version data entries

3 entries across 1 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isImmutable.js.map
trusty-cms-6.3.1 node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isImmutable.js.map
trusty-cms-6.3.1 node_modules/@babel/types/lib/validators/isImmutable.js.map